apache / apache/lucene

IndexWriter should immediately resolve deleted docs to docID in near-real-time mode [LUCENE-2047]

Open
#3,122 30 comments 0 reactions 1 assignee Claimed by @mikemccand View on GitHub
legacy-jira-fix-version:4.9 legacy-jira-fix-version:6.0 legacy-jira-priority:Minor module:core/index type:enhancement
Dominant language
Java
Stars
3.6k
Forks
1.4k
Avg merge
2d 11h
Merged PRs (30d)
88

Description

Spinoff from #2600.

When deleteDocuments(Term) is called, we currently always buffer the
Term and only later, when it's time to flush deletes, resolve to
docIDs. This is necessary because we don't in general hold
SegmentReaders open.

But, when IndexWriter is in NRT mode, we pool the readers, and so
deleting in the foreground is possible.

It's also beneficial, in that in can reduce the turnaround time when
reopening a new NRT reader by taking this resolution off the reopen
path. And if multiple threads are used to do the deletion, then we
gain concurrency, vs reopen which is not concurrent when flushing the
deletes.

---
Migrated from [LUCENE-2047](https://issues.apache.org/jira/browse/LUCENE-2047) by Michael McCandless (@mikemccand), updated May 09 2016
Attachments: [LUCENE-2047.patch](https://apache.github.io/lucene-jira-archive/attachments/LUCENE-2047/LUCENE-2047.patch) (versions: 7)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.