add updateDocuments(Term, ColumnBatch) to IndexWriter for atomic delete-and-add columnar operations
- Dominant language
- Java
- Stars
- 3.6k
- Forks
- 1.4k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 88
Description
experimental columnar indexing API (`IndexWriter.addBatch(ColumnBatch)`) added supports bulk columnar document addition, but there is no equivalent to `updateDocuments(Term, Iterable)`
for columnar batches. Users who index via columns cannot atomically delete existing documents by term
and add a new columnar batch in a single operation.
add the following public methods to `IndexWriter`
```java
/**
* Atomically deletes documents matching the provided term and adds a batch of documents
* in column-oriented format.
*/
public long updateDocuments(Term delTerm, ColumnBatch columnBatch) throws IOException;
/**
* Similar to above but takes a Query instead of a Term.
*/
public long updateDocuments(Query delQuery, ColumnBatch columnBatch) throws IOException;
Contributor guide
Research direction
Start in the IndexWriter entry point, comparing the existing updateDocuments overloads with addBatch(ColumnBatch). Trace how term- and query-based deletion is combined with columnar batch addition, then verify that both new overloads preserve atomic delete-and-add behavior and return the expected result.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100