Is there a rollback in lucene?
I'm saving & 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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.