I'm new to SOLR and have managed to get some basic indexing and querying
working. However I haven't been able to successfully implement the indexing
of a parent child database relationship.

My db-data-config.xml is:

<dataConfig>
    <dataSource driver="com.ibm.as400.access.AS400JDBCDriver"
url="jdbc:as400://FAB/SV95TNDTA;;naming=system;" user="SV95TNGLB"
password="GLOBAL95TN" />
    <document>
        <entity name="client" query="SELECT #1ABCD, #1C8TX, #1AFTX, #1A7NA,
#1A8NA FROM AAAAREP">   
          <field column="#1ABCD" name="id" />
          <field column="#1C8TX" name="surname" />
          <field column="#1AFTX" name="forenames" />
          <field column="#1A7NA" name="ird_number" />
          <field column="#1A8NA" name="gst_number" />
          <entity name="idreference" query="select M6ABR from ABM6CPP where
M6ABCD='${client.id}'">
            <field column="M6ABR" name="id_reference" />
          </entity>
        </entity>
    </document>
</dataConfig>

Most 'client' records will have one or more 'idreference' records. SOLR
seems to import the data successfully (see status below) but when I do a *:*
search there are no 'id_reference' elements in any document (see below at
bottom):

<response>
<lst name="responseHeader">
<int name="status">0</int>
<int name="QTime">0</int>
</lst>
<lst name="initArgs">
<lst name="defaults">
<str name="config">db-data-config.xml</str>
</lst>
</lst>
<str name="command">status</str>
<str name="status">idle</str>
<str name="importResponse"/>
<lst name="statusMessages">
<str name="Total Requests made to DataSource">13594</str>
<str name="Total Rows Fetched">13593</str>
<str name="Total Documents Skipped">0</str>
<str name="Full Dump Started">2012-03-13 13:15:07</str>
<str name="">
Indexing completed. Added/Updated: 13593 documents. Deleted 0 documents.
</str>
<str name="Committed">2012-03-13 13:15:36</str>
<str name="Optimized">2012-03-13 13:15:36</str>
<str name="Total Documents Processed">13593</str>
<str name="Time taken ">0:0:29.804</str>
</lst>
<str name="WARNING">
This response format is experimental. It is likely to change in the future.
</str>
</response>







<result name="response" numFound="13593" start="0" maxScore="1.0">
<doc>
<float name="score">1.0</float>
<str name="forenames">John David</str>
<str name="gst_number"></str>
<str name="id">0000012345</str>
<str name="ird_number">000000000000</str>
<str name="surname">Sagers</str>
</doc>
<doc>
<float name="score">1.0</float>
<str name="forenames">Mark James</str>
<str name="gst_number"></str>
<str name="id">0000000426</str>
<str name="ird_number"></str>
<str name="surname">Kirby</str>
</doc>
...

Any assistance would be greatly appreciated.





--
View this message in context: 
http://lucene.472066.n3.nabble.com/Incomplete-documents-with-parent-child-DB-relationship-tp3820963p3820963.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to