Well, do both parent and child entity have a field called 'id'
containing their corresponding unique ids? That would be the first
step.

Regards,
   Alex.
----
Newsletter and resources for Solr beginners and intermediates:
http://www.solr-start.com/


On 19 August 2016 at 09:10, Peri Subrahmanya
<peri.subrahma...@htcinc.com> wrote:
> Hi,
>
> I have a simple one-to-many relationship setup in the data-import.xml and 
> when I try to index it using the dataImportHandler, Solr complains of “no 
> unique id found”.
>
> managed-schema.xml
> <uniqueKey>id</uniqueKey>
> solrconfig,xml:
> <updateRequestProcessorChain>
>   <processor class="solr.UUIDUpdateProcessorFactory">
>     <str name="fieldName">id</str>
>   </processor>
>   <processor class="solr.LogUpdateProcessorFactory" />
>   <processor class="solr.RunUpdateProcessorFactory" />
> </updateRequestProcessorChain>
>
> data-import.xml
> <dataConfig>
>     <dataSource type="JdbcDataSource"
>                 driver="com.mysql.jdbc.Driver"
>                 url="jdbc:mysql://x.x.x.x:3306/xx"
>                 user=“blah"
>                 password=“blah"/>
>
>     <document>
>         <entity name=“catalog"
>                 query="select blah blah from catalog">
>
>             <entity child='true' name=“product"
>                     query=“select blah blah from course where 
> catalog_id=‘${catalog.catalog_id}'">
>             </entity>
>
>         </entity>
>     </document>
>
> </dataConfig>
>
> Could someone please advise?
>
> Thanks
> -Peri

Reply via email to