apache / apache/lucene

TopSuggestDocsCollector#collect should be able to signal rejection [LUCENE-8995]

Open
#10,038 1 comment 0 reactions 0 assignees View on GitHub
affects-version:8.2 legacy-jira-priority:Minor module:suggest type:enhancement
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.