apache / apache/lucene

TopFieldCollector(s) Should Prepopulate Sentinel Objects [LUCENE-8970]

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

Description

We do not repopulate the hit queue with sentinel values today, thus leading to extra checks and extra code.

---
Migrated from [LUCENE-8970](https://issues.apache.org/jira/browse/LUCENE-8970) by Atri Sharma (@atris), updated Sep 13 2019

Contributor guide

Open the contributing guide

Research direction

Start by locating TopFieldCollector and its hit-queue population logic in the Lucene source. Trace how the queue currently handles empty positions and identify existing tests covering this collector before changing it. Done means the queue is prepopulated with sentinel values, the extra checks are no longer needed, and the affected tests pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
search
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.