apache / apache/lucene

Remove IndexReaderContext/CompositeReaderContext/AtomicReaderContext [LUCENE-5970]

Open
#7,032 4 comments 0 reactions 0 assignees View on GitHub
legacy-jira-priority:Major type:bug
Dominant language
Java
Stars
3.6k
Forks
1.4k
Avg merge
2d 11h
Merged PRs (30d)
88

Description

This hierarchy is mega-confusing, has a overcomplicated hierarchy, and is full of bugs.

For example, in a two-segment index with one document in each:
{code}
context.docbase: 1
context.reader().getContext().docBase: 0
{Code}

There is just no need for all this. We can replace it all with 'docbase'. For the esoteric stuff solr wants to do, like top-level crap, it can do this with its own filterreader instead, rather than pushing the complexity into lucene.

---
Migrated from [LUCENE-5970](https://issues.apache.org/jira/browse/LUCENE-5970) by Robert Muir (@rmuir), updated Oct 15 2014

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the IndexReaderContext, CompositeReaderContext, and AtomicReaderContext hierarchy and the migrated LUCENE-5970 discussion. Trace the docBase mismatch shown in the two-segment example; done would require an agreed replacement using docbase and confirmation that Solr-specific top-level behavior remains outside Lucene.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend, search
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.