Better validate CodecReaders in addIndexes [LUCENE-8277]
- Dominant language
- Java
- Stars
- 3.6k
- Forks
- 1.4k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 88
Description
The discussion at #9311 made me wonder that we should apply the same checks to addIndexes(CodecReader) that we apply at index time if the input reader is not a SegmentReader such as:
- positions are less than the maximum position
- offsets are going forward
And maybe also check that the API is implemented correctly, eg. terms, doc ids and positions are returned in order?
---
Migrated from [LUCENE-8277](https://issues.apache.org/jira/browse/LUCENE-8277) by Adrien Grand (@jpountz), updated Apr 26 2018
Attachments: [LUCENE-8277.patch](https://apache.github.io/lucene-jira-archive/attachments/LUCENE-8277/LUCENE-8277.patch)
Contributor guide
Research direction
Start with the addIndexes(CodecReader) API and review the discussion in issue #9311, along with the attached LUCENE-8277.patch. Determine which index-time checks apply to non-SegmentReader inputs and whether terms, doc IDs, and positions must be validated for ordering. Done means the intended validation scope is settled and the relevant checks are covered.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend, search
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100