开发者

Solr index for RDBMS with jdbc driver

开发者 https://www.devze.com 2023-03-25 22:49 出处:网络
I be开发者_如何转开发lieve i can create a Solr index for data in RDBMS using dataImportHandler.

I be开发者_如何转开发lieve i can create a Solr index for data in RDBMS using dataImportHandler. But I am not sure how to keep the index in sync when the table is updated (new data added,data deleted etc.)

I am using Solr for full-text search for a particular table in my database


You should update your solr index periodically or use an trigger to update solr, if your DB data are changed.

To update the SOLR index there are different ways:

1.) run an delta import: http://wiki.apache.org/solr/DataImportHandler#Using_delta-import_command

2.) run an full import without clean=true (set clean=false)option http://wiki.apache.org/solr/DataImportHandlerDeltaQueryViaFullImport

It's up to you. In my case, i prefer the 2nd way with FullImport and clean=false


Well you simply need to add new data as well to Solr. Maybe the RDBMS has som kind of event system you can use to catch events that you could trigger indexing on.

If you want a more detailed answer you need to add more information

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号