开发者

How do i keep my DB and lucene in sync?

开发者 https://www.devze.com 2022-12-26 16:58 出处:网络
So i can have a transaction in sql. But i am sure its not a good idea to wait in the开发者_JAVA技巧 middle of a transaction for lucene to finish also i am unsure if lucene is permanently saved in the

So i can have a transaction in sql. But i am sure its not a good idea to wait in the开发者_JAVA技巧 middle of a transaction for lucene to finish also i am unsure if lucene is permanently saved in the DB until i do something there.

Whats the best way to keep my DB and lucene in sync? I am thinking of adding a lucene_queue in my sql db and everytime i make a change i add it into the queue (removing older queue if any) and delete it once it is done.

Is this the best way? Also i am unsure how to make lucene permanently keep the changes i made and how frequent i can/should do it.


Use Solr's DataImportHandler. It should work out of the box for you.

0

精彩评论

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

关注公众号