salvatorecampagna commented on issue #13084:
URL: https://github.com/apache/lucene/issues/13084#issuecomment-3496411381

   Hi @jpountz @uschindler,
   
   I'd like to work on this issue and have a few questions about scope and 
approach:
   
   **Proposed implementation:** `LiveDocs` interface extending `Bits` with 
`deletedDocsIterator()`, backed by `SparseLiveDocs` (uses `SparseFixedBitSet` 
for deleted docs when < 20% deleted) or `DenseLiveDocs` (uses `FixedBitSet` 
when ≥ 20% deleted). This satisfies the sequential access requirement mentioned 
in the issue.
   
   **Questions:**
   
   1. **Scope**: Should the first PR be runtime-only (in-memory optimization), 
or include file format changes for Lucene 10? Runtime-only is simpler but 
memory savings don't persist. File format would enable storage savings (e.g., 
6x for 50M docs @ 0.5% deletions) but requires version bump with backward 
compatibility.
   
   2. **Threshold determination**: Is it acceptable to determine the 
sparse/dense threshold empirically via JMH benchmarks? I'd measure iteration 
performance, memory usage, and random access impact across deletion ratios 
(0.1%-50%) to validate the 20% starting point from initial analysis and 
eventually change the threshold value according to benchmarks.
   
   3. **Validation**: Issue #15226 (histogram regression with deleted docs) 
could serve as a good verification step once this enhancement is merged, as it 
would directly benefit from the `deletedDocsIterator()` API. Worth noting as a 
potential follow-up?
   
   I'll include comprehensive benchmarks for:
   * threshold calculation trade-off
   * random access trade-off (SparseFixedBitSet's block indirection vs 
FixedBitSet's direct array) to ensure query performance isn't negatively 
impacted.
   
   Happy to adjust the approach based on feedback!


-- 
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