简体   繁体   中英

Updating documents fields using lucene

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM