title: How to join multiple indexes in Sphinx
body: <p>I have two separate entities, project and users which do not relate to each other.</p>
  
  <p>I have opted to use the xmlpipe2 data source rather than mysql due to the complex joins etc.</p>
  
  <p>I would like the user to be able to search through the users and projects at the same time.</p>
  
  <p>My Project xml source:</p>
  
  <pre><code>    &lt;sphinx:document id="1"&gt;
          &lt;title&gt;Project 1&lt;/title&gt;
          &lt;details&gt;some details bob&lt;/details&gt;
      &lt;/sphinx:document&gt;
      &lt;sphinx:document id="2"&gt;
          &lt;title&gt;Project 2&lt;/title&gt;
          &lt;details&gt;some more details bob&lt;/details&gt;
      &lt;/sphinx:document&gt;
      ...etc...
  </code></pre>
  
  <p>My Users xml source:</p>
  
  <pre><code>    &lt;sphinx:document id="1"&gt;
          &lt;name&gt;Bob Smith&lt;/name&gt;
          &lt;age&gt;16&lt;/age&gt;
      &lt;/sphinx:document&gt;
      &lt;sphinx:document id="2"&gt;
          &lt;name&gt;Dorathy Melton&lt;/name&gt;
          &lt;age&gt;22&lt;/age&gt;
      &lt;/sphinx:document&gt;
      ...etc...
  </code></pre>
  
  <p>I have two separate indexes for Projects and Users</p>
  
  <p>Now in my php code how can search through both indexes at the same time, like</p>
  
  <pre><code>    $s = new SphinxClient();
      $res = $s-&gt;Query('bob', "projects users");
  </code></pre>
  
  <p>I would expect some matches from project and the users, however it only searches one index as the IDs are the same for both indexes.</p>
  
  <p>My back up solutions, which dont sound right
  1. Try joining the two sets of data together and having 1 index
  2. I run two separate queries </p>
  
  <pre><code>    $res = $s-&gt;Query('bob', "projects");
      $res = $s-&gt;Query('bob', "users");
  </code></pre>