apache / apache/lucene

A Real-Time Split Policy For Searching In Real-Time [LUCENE-2431]

Open
#3,505 0 comments 0 reactions 0 assignees View on GitHub
affects-version:3.0.1 legacy-jira-priority:Major module:core/index type:enhancement
Dominant language
Java
Stars
3.6k
Forks
1.4k
Avg merge
2d 11h
Merged PRs (30d)
88

Description

(Please note that the feature described in #3499 is required reading for this issue.)

The real-time policy makes it possible to search and read from a (Lucene) split index in a real-time manner. Specifically, changes made to the split writer will immediately be reflected in all readers that were obtained from it.

Note that, while the readers based on this policy are real-time, in order to truly achieve real-time searching, one must use a real time searcher, which in turn builds on the index searcher (see attached test cases for more details).

Now, we describe how this policy overcomes the near-real time limitation of current indices. For every reader, it creates a split in the form of a RAM-based directory, which serves to track changes made to the split index in between the time that and the next reader was obtained. When a new reader is obtained, the corresponding split is dynamically added to that reader, and all the readers that came before it. Note that a reader does not need to (nor does it) see the splits that came before it, since the snapshot of the super-reader that it obtains is current at the time of its inception.

---
Migrated from [LUCENE-2431](https://issues.apache.org/jira/browse/LUCENE-2431) by Karthick Sankarachary
Attachments: [LUCENE-2431.patch](https://apache.github.io/lucene-jira-archive/attachments/LUCENE-2431/LUCENE-2431.patch)
Linked issues:
- #3499

Contributor guide

Open the contributing guide

Research direction

Begin by reading linked issue #3499, then review the attached LUCENE-2431.patch and its referenced test cases. No source file or test path is named in the issue. Done means changes from the split writer are immediately visible to all readers and real-time searching works through the real-time searcher.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend, search
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.