开发者

How do i keep my DB and lucene in sync?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜