开发者

Rollback in lucene

Is there a rollback in lucene?

I'm saving &开发者_StackOverflow社区 updating database repository & lucene repository simultaneously so that the lucene index & database are in sync..

ex.

CustomerRepository.add(customer);
SupplierRepository.add(supplier);

CustomerLuceneRepository.add(customer); 
SupplierLuceneRepository.add(supplier); // If this here fails i cannot rollback the customer above

DataContext.SubmitChanges();


I am not completely sure on how you are using Lucene or how the C# version differs from the Java version, but at least IndexWriter in Java contains methods for commit and rollback. If you could post some implementation code that would probably help.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜