apache / apache/lucene

TopDocsCollector Should Not Depend on Priority Queue [LUCENE-8877]

Open
#9,920 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

TopDocsCollector is tightly coupled to the notion of priority queue, which is not necessarily a good abstraction to have since the collector really just needs an interface to iterate on and hold docID and score, with possibly shard indexes.

 

We should rewrite this to a more simplistic interface with priority queue being the default implementation

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

Contributor guide

Open the contributing guide

Research direction

Start by tracing TopDocsCollector and its dependency on the priority queue. Determine the interface needed to iterate over docID, score, and possible shard indexes, then verify that priority queue remains the default implementation; the issue names no files or tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
search
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.