title: Solr join best approach
body: <p>I have a scenario where I have a productdatabase in solr and a branddatabase in MySql. In the solr productdatabase I have a field named brandid where I refer to the Mysql primary key from the branddatabase. Now I would like to join the branddatabase for each solr searchquery and groups the result seperatly from the product results. I thought about a second solr database where I save the branddata and then join it on every query, but I would like to have each brand only one time and not merged together with the product results in the same resultset. A facette-style result for the brands is my goal. Anyone has a pointer how I could achieve this kind of results in my xml/json?</p>
  
  <p>The resultset how I would like to have it in pseudo solr code:</p>
  
  <pre><code>&lt;results&gt;
      &lt;products&gt;
          &lt;product&gt;
              ...
          &lt;/product&gt;
          &lt;product&gt;
              ...
          &lt;/product&gt;
          &lt;product&gt;
              ...
          &lt;/product&gt;
          &lt;product&gt;
              ...
          &lt;/product&gt;
      &lt;/products&gt;
      &lt;brands&gt;
          &lt;brand&gt;
              ...
          &lt;/brand&gt;
          &lt;brand&gt;
              ...
          &lt;/brand&gt;
      &lt;/brands&gt;
  &lt;/results&gt;
  </code></pre>