mikemccand commented on code in PR #12341:
URL: https://github.com/apache/lucene/pull/12341#discussion_r1213034359


##########
lucene/CHANGES.txt:
##########
@@ -130,6 +130,9 @@ API Changes
 * GITHUB#12268: Add BitSet.clear() without parameters for clearing the entire 
set
   (Jonathan Ellis)
 
+* GITHUB#12341: add new IndexWriter#updateDocuments(Query, Iterable<Document>) 
API
+  to update documents using a query. (Patrick Zhai)

Review Comment:
   Maybe add `to update documents atomically, with respect to refresh and 
commit, using a query`?



##########
lucene/core/src/test/org/apache/lucene/index/TestIndexWriter.java:
##########
@@ -3476,7 +3476,12 @@ public int numDeletesToMerge(
                       Document doc = new Document();
                       doc.add(new StringField("id", id, Field.Store.YES));
                       if (mixDeletes && random().nextBoolean()) {
-                        writer.updateDocuments(new Term("id", id), 
Arrays.asList(doc, doc));
+                        if (random().nextBoolean()) {
+                          writer.updateDocuments(new Term("id", id), 
Arrays.asList(doc, doc));
+                        } else {
+                          writer.updateDocuments(

Review Comment:
   Maybe also do this randomness in `RandomIndexWriter`?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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

Reply via email to