i'm trying to update an indexed documents in lucene by searching for the document, and then extracting the indexed document fields, and then deleting the document and creating a new one. is there anther effective way for such an update?
There isn't. The best you can get is IndexWriter.updateDocument(Term term, Iterable<? extends IndexableField> document)
but even this deletes and adds the same document again.
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.