简体   繁体   中英

Solr delta-import across multiple databases

I have created a Solr Index whose documents are formed from Two databases db1 and db2. I can successfully do a full-import as follows:

    <entity name="ent1" dataSource="db1" query="select ID_DB1 from table1">  
       <field column="ID_DB1" name="ID_DB1"/>  

       <entity name="ent2" dataSource="db2" query="select ID_DB2 from table2 where ID_DB2='${ent1.ID_DB1}'">  
       <field column="ID_DB2" name="ID_DB2"/>  
       </entity>    

    </entity>

But delta import throws NullPointerException.
How to write delta-query, parent-delta-query and delta-import-query for this scenario?
Any help is appreciated!

This is possible to have multiple datasources in Solr DIH. Just check this out . You should specify a datasource per <entity> .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM