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

ASF subversion and git services commented on LUCENE-10606:
----------------------------------------------------------

Commit 03846b468e52126582c09816f7e85e98aee9a405 in lucene's branch 
refs/heads/main from Kaival Parikh
[ https://gitbox.apache.org/repos/asf?p=lucene.git;h=03846b468e5 ]

LUCENE-10606: For KnnVectorQuery, optimize case where filter is backed by 
BitSetIterator (#951)

Instead of collecting hit-by-hit using a `LeafCollector`, we break down the
search by instantiating a weight, creating scorers, and checking the underlying
iterator. If it is backed by a `BitSet`, we directly update the reference (as
we won't be editing the `Bits`). Else we can create a new `BitSet` from the
iterator using `BitSet.of`.

> Optimize hit collection of prefilter in KnnVectorQuery for BitSet backed 
> queries
> --------------------------------------------------------------------------------
>
>                 Key: LUCENE-10606
>                 URL: https://issues.apache.org/jira/browse/LUCENE-10606
>             Project: Lucene - Core
>          Issue Type: Improvement
>          Components: core/search
>            Reporter: Kaival Parikh
>            Priority: Minor
>              Labels: performance
>          Time Spent: 3h 50m
>  Remaining Estimate: 0h
>
> While working on this [PR|https://github.com/apache/lucene/pull/932] to add 
> prefilter testing support, we saw that hit collection took a long time for 
> BitSetIterator backed scorers (due to iteration over the entire underlying 
> BitSet, and copying it into an internal one)
> These BitSetIterators can be frequent (as they are used in LRUQueryCache), 
> and bulk collection can be optimized with more knowledge of the underlying 
> iterator



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

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

Reply via email to