lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexandre Rafalovitch <arafa...@gmail.com>
Subject Re: DataImport-Solr6: Nested Entities
Date Fri, 19 Aug 2016 01:43:20 GMT
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.subrahmanya@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

Mime
View raw message