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

Gautam Worah edited comment on LUCENE-9620 at 8/9/21, 1:45 AM:
---------------------------------------------------------------

Hey [~jpountz], I wanted to work on this issue. 
 With this change, callers will use something like this:

{{{color:#000000}searcher{color}.createWeight(someQuery, 
{color:#000000}ScoreMode{color}.{color:#871094}COMPLETE{color}, 
{color:#1750eb}1{color}).count(LeafReaderContext)}}

instead of the current {{searcher.count(Query)}} call. Is this what you had in 
mind?


 I am still working on piping the {{IndexSearcher#search(Query, 
CollectorManager)}} call to {{Weight#count}}


was (Author: gworah):
Hey [~jpountz], I wanted to work on this issue. 
With this change, callers will use something like this:

{{{color:#000000}searcher{color}.createWeight(someQuery, 
{color:#000000}ScoreMode{color}.{color:#871094}COMPLETE{color}, 
{color:#1750eb}1{color}).count(LeafReaderContext)}}

instead of the current {{searcher.count(Query)}} call. Is this what you had in 
mind?


> Add Weight#count(LeafReaderContext)
> -----------------------------------
>
>                 Key: LUCENE-9620
>                 URL: https://issues.apache.org/jira/browse/LUCENE-9620
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Adrien Grand
>            Priority: Minor
>
> We have IndexSearcher#count today, which tries to optimize counting for 
> TermQuery and MatchAllDocsQuery, and falls back to BulkScorer + 
> TotalHitCountCollector otherwise.
> I'm considering moving this to Weight instead, where it'd be a better place 
> to add counting optimizations for other queries, e.g. pure disjunctions over 
> single-valued fields or range queries on points. The default implementation 
> could use a BulkScorer+TotalHitCountCollector like IndexSearcher#count does 
> today.



--
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