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

David Smiley commented on SOLR-15257:
-------------------------------------

Couple additional points:
* The resulting Query ought to expose the DocSet (e.g. via a getter) to enable 
optimizations (not yet written) in Solr.  I'm thinking that 
SolrIndexSearcher.getProcessedFilter (or a method it already calls) could 
detect this and simply unwrap the Query to expose the DocSet.  The Query could 
perhaps implement DocSetProducer?
* Filter has a boolean "applyLazily" that effectively picks between an 
iteration based algorithm, or TwoPhaseIterator.  Within Solr, I believe it's 
always "false" thus meaning _not_ TwoPhaseIterator.  In this issue, we may want 
to keep things as they are and leave performance implications to a separate 
issue[1].  This only applies to BitDocSet, not the integer array one

[1] I can definitely imagine there is room for improvement here for Solr to 
pick the right algorithm depending on the situation instead of always 
iteration.  The smaller the bitset, the more likely it ought to be iterator 
based.  If the Weight's BulkScorer is called (e.g. thus this is the *only* 
query), then definitely iterator based, and could also skip applying deleted 
docs (since DocSets are already filtered by them).  I could also imagine a 
hybrid iterator & TPI combo in which the approximation iterator looks at only 
the "long" values, and the TPI part looks at a bitmask of an individual "long".

> Add DocSetQuery in lieu of DocSet.getTopFilter
> ----------------------------------------------
>
>                 Key: SOLR-15257
>                 URL: https://issues.apache.org/jira/browse/SOLR-15257
>             Project: Solr
>          Issue Type: Sub-task
>          Components: search
>            Reporter: David Smiley
>            Priority: Major
>
> With Filter going away, we still need the ability to have a Query based on a 
> DocSet.  This currently happens via {{DocSet.getTopFilter}}.  We could add a 
> {{.makeQuery}} or just provide it.
> This issue depends on changes to DocSet's API to provide a DocIdSetIterator 
> given a LeafReaderContext.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to