unnecessary assert on docid [LUCENE-4958]
- Dominant language
- Java
- Stars
- 3.6k
- Forks
- 1.4k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 88
Description
In DocFieldProcessor, on line 353, there is this assert:
assert docValuesConsumerAndDocID.docID < docState.docID;
Is this assert necessary? I don't see in the indexing pipeline that this guarantee is needed. Can we remove this?
We have implemented a custom indexingchain that rewrites docState.docID is reverse order and it is working well. But we have to do ugly workarounds in our test to avoid this assert.
---
Migrated from [LUCENE-4958](https://issues.apache.org/jira/browse/LUCENE-4958) by John Wang
Contributor guide
Research direction
Inspect DocFieldProcessor around line 353 and trace the indexing pipeline to determine whether the docID ordering assertion is required. Remove the assertion if reverse-order docState.docID values remain valid, then run the relevant indexing tests and confirm the existing workaround is no longer needed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- search
- Issue type
- Refactor
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100