expose position information in SegmentReader, add method getPosition(term) [LUCENE-2543]
- Dominant language
- Java
- Stars
- 3.6k
- Forks
- 1.4k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 88
Description
add public long getPosition(Term) to SegmentReader.
Also, update the impl of getPosition in TermInfosReader (called by new method) to use enumerator.scanTo() to avoid creating many intermediate Term objects.
---
Migrated from [LUCENE-2543](https://issues.apache.org/jira/browse/LUCENE-2543) by Woody Anderson, updated May 09 2016
Attachments: [LUCENE-2543.patch](https://apache.github.io/lucene-jira-archive/attachments/LUCENE-2543/LUCENE-2543.patch)
Contributor guide
Research direction
Start by reading SegmentReader and the existing getPosition implementation in TermInfosReader, then trace how its enumerator currently locates terms. Done means exposing public long getPosition(Term) on SegmentReader and updating TermInfosReader to use enumerator.scanTo() without creating many intermediate Term objects.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- search
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 38/100