You are talking about "updateDocuments(Term delTerm, Iterable docs)"?

We could add another method with Query like [https://lucene.apache.org/core/9_6_0/core/org/apache/lucene/index/IndexWriter.html#deleteDocuments(org.apache.lucene.search.Query...)]. Implementation behind could be the same. Basically it would do the same but just use delQuery using the DocIdSetIteraor of the query and Iterable for the new block.

Uwe

Am 30.05.2023 um 23:52 schrieb Patrick Zhai:
Hi folks,
Currently the only way to update a block of documents is by identifying them with a term and update those documents. However we have a case where the child documents does not share a same identifier as parent documents, and to identify the whole block of documents we need to use at least a disjunction query like: (parentId: xx OR id: xx). I wonder whether we could add a new API to IndexWriter supportingĀ that? It seems to me we just need to create a new DeleteQueue node with queries instead of terms and pass it into internal updates method? Or amĀ I missing something so that update using query is not obvious?

Thanks
Patrick

--
Uwe Schindler
Achterdiek 19, D-28357 Bremen
https://www.thetaphi.de
eMail: u...@thetaphi.de


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to