[ 
https://issues.apache.org/jira/browse/LUCENE-8995?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16942216#comment-16942216
 ] 

Michael McCandless commented on LUCENE-8995:
--------------------------------------------

+1, it'd be nice if the {{collect}} method could communicate whether it 
filtered the hit or not ... it'd make it easier to make cascading collectors, 
where the first collector controls whether the subsequent collectors should 
collect.

I'm pretty sure there was a discussion on the dev list ~ year ago about this 
exact idea ... maybe dig that up and link it here for some context?

> TopSuggestDocsCollector#collect should be able to signal rejection
> ------------------------------------------------------------------
>
>                 Key: LUCENE-8995
>                 URL: https://issues.apache.org/jira/browse/LUCENE-8995
>             Project: Lucene - Core
>          Issue Type: Improvement
>          Components: modules/suggest
>    Affects Versions: 8.2
>            Reporter: Christoph Büscher
>            Priority: Minor
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> 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.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to