0

I have two databases which contains different attributes about a person. Database 'A' may contain fields like age, location. Database 'B' may contain fields like occupation, education.

Database 'A' users                     Database 'B' users
Charlie-18, California                 Charlie-Engineer, Masters
Amanda-21, Nevada                      Darwin-Teacher, Bachelors

I want an index with documents-

<doc>
  <str>Charlie   </str>`
  <int>18        </int>
  <str>California</str>
  <str>Engineer  </str>
  <str>Masters   </str>
<doc>

<doc>
  <str>Darwin   </str>
  <int>         </int>
  <str>         </str>
  <str>Teacher  </str>
  <str>Bacherlor</str>
<doc>

<doc>
  <str>Amanda    </str>
  <int>21        </int>
  <str>Nevada    </str>
  <str>          </str>
  <str>          </str>
<doc>

I know I can use multiple database and nest entities like here- http://wiki.apache.org/solr/DataImportHandler#Multiple_DataSources

But this will get me on Charlie and Amanda's information if I nest Database B entities inside Database A.

How to get attributes for all available persons in either of the databases? How can I configure this?

femtoRgon
  • 32,893
  • 7
  • 60
  • 87
blue01
  • 2,035
  • 2
  • 23
  • 38
  • I assume (given the link) that you need a solution using DataImportHandler? – femtoRgon Jun 21 '14 at 20:57
  • I guess Dataimporthandler would just be pulling the data. but how should I configure solr to get a union of the data from these two sources. – blue01 Jun 23 '14 at 20:15

0 Answers0