开发者

Rollback in lucene

开发者 https://www.devze.com 2023-01-01 09:28 出处:网络
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..

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

精彩评论

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