title: Search over multiple indexes
body: <p>I've got three tables in my DB</p>
  
  <p><strong>organization</strong><br>
  | id | name | attribute_1 | attribute_2 |</p>
  
  <p><strong>document</strong><br>
  | id | org_id | content |</p>
  
  <p><strong>person</strong><br>
  | id | org_id | name | status |</p>
  
  <p>Relation between <strong>organization</strong> and <strong>document</strong> is 1:1. Organization may have only one document.</p>
  
  <p>Relation between <strong>organization</strong> and <strong>person</strong> is 1:n. Organization may have many persons.</p>
  
  <p>Table <strong>document</strong> has about 12 000 000 records and takes more than 500 Gb on disk. Records in the table never change.</p>
  
  <p>Table <strong>organization</strong> has about 30 000 000 records but takes only 8 Gb on disk. Records in the table are changing quite often, so I need do full re-indexing.</p>
  
  <p>Here are my indices:</p>
  
  <pre><code>source organization {
          sql_query = select * from organization
          sql_attr_string attribute_1
          sql_attr_string attribute_2
  }
  
  source document {
          sql_query = select * from document
          sql_attr_uint org_id
  }
  
  source person {
          sql_query = select * from person
          sql_attr_uint org_id
          sql_attr_uint status
  }
  </code></pre>
  
  <p>The typical request looks like this:</p>
  
  <p><em>Find the first 100 organization containing "Acme" in name, "bankrupt" in document and has person with name "John".</em></p>
  
  <p>How can I do this?</p>
  
  <p>P.S. I use Sphinx API, but I can switch to SphinxQL</p>