简体   繁体   中英

Add new field to Solr schema and import only that perticular column

I want to know if there is any way to update only one field in solr using import handler. Here are some steps I performed :

1) I have defined a schema which contains some dynamic fields. 2) I added some records to solr using data import handler from sql table. 3) A new column gets introduced in the sql table and entries for that column in sql table has been populated based on some existing columns (No new rows has been added).

Is there any way to index only this newly generated column without importing the whole data again?

You can use atomic update . I dont know how to use the DIH to do atomic updates, but if you can form a document such that it adheres to the atomic updates format you can probably update the document. But, to apply atomic updates there are some guidelines which are based on the architecture you have used for SOLR. The most important one according to me is that all the fields of the documents should be stored , else you will loose the index for the unstored fields.

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