TopSuggestDocsCollector#collect should be able to signal rejection [LUCENE-8995]
- Dominant language
- Java
- Stars
- 3.6k
- Forks
- 1.4k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 88
Description
Currently the suggestion collectors collect() method has no way of signaling back to the caller whether the matched completion it received was indeed collected.
While this is currenty always the case for the default TopSuggestDocsCollector, there are implementations that overwrite this with custom collection logic that also deduplicates based on e.g. docID and/or context. Currently if those completions are rejected, the calling TopNSearcher has no way of noting these rejections and might therefore terminate early, thus missing on completions that should be returned.
---
Migrated from [LUCENE-8995](https://issues.apache.org/jira/browse/LUCENE-8995) by Christoph Büscher (@cbuescher), updated Oct 16 2019
Contributor guide
Research direction
Start by reading TopSuggestDocsCollector#collect and TopNSearcher to understand how collection results currently flow between them. Trace the early-termination decision and define completion as preserving rejected-match information so the searcher does not stop before valid completions are returned.
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
- Mostly clear
- Newbie friendliness
- 45/100