ChrisHegarty commented on code in PR #16418:
URL: https://github.com/apache/lucene/pull/16418#discussion_r3664786339


##########
lucene/core/src/java/org/apache/lucene/index/IndexWriterConfig.java:
##########
@@ -324,6 +338,43 @@ public boolean getReaderPooling() {
     return readerPooling;
   }
 
+  /**
+   * When enabled, a doc-values update that only sets values (no removals) is 
written as a sparse
+   * "delta" generation holding just the updated documents and overlaid on the 
existing column at
+   * read time, rather than rewriting the whole column. This trades some read 
cost for much lower
+   * write amplification on frequently updated fields. Enabled by default; 
pass {@code false} to
+   * keep the classic full-column rewrite.
+   *
+   * <p>A commit whose segments carry sparse delta generations is written at a 
bumped segments-file
+   * version, so a Lucene version that predates this feature refuses to open 
it rather than
+   * misreading a delta as the whole column. A segment merge (including a 
force-merge) flattens the
+   * overlay back to a plain column, so once all overlays are merged away 
older versions can read
+   * the index again. Only takes effect when IndexWriter is first created.
+   *
+   * @lucene.experimental
+   */
+  public IndexWriterConfig setIncrementalDocValuesUpdates(boolean 
incrementalDocValuesUpdates) {

Review Comment:
   Minor API thought: do we need both `setIncrementalDocValuesUpdates(boolean)` 
and `setMaxDocValuesDeltaGenerations(int)`? It seems like a single setting 
would cover both `setMaxDocValuesDeltaGenerations(0)` disables the feature, 
anything `> 0` enables it with that depth. Avoids the question of what happens 
when the two disagree, and one fewer knob for users to reason about.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to