You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2021/09/03 07:10:00 UTC

[jira] [Commented] (LUCENE-9620) Add Weight#count(LeafReaderContext)

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

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

Commit 44e9f5de53aefb59f8aa3f95eb348ae79280f390 in lucene's branch refs/heads/main from Gautam Worah
[ https://gitbox.apache.org/repos/asf?p=lucene.git;h=44e9f5d ]

LUCENE-9620 Add Weight#count(LeafReaderContext) (#242)

Add a default implementation in Weight.java and add sample faster
implementations in MatchAllDocsQuery, MatchNoDocsQuery, TermQuery

Add tests for BooleanQuery and TermQuery

Co-authored-by: Gautam Worah <ga...@amazon.com>
Co-authored-by: Adrien Grand <jp...@gmail.com>

> 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
>          Time Spent: 4.5h
>  Remaining Estimate: 0h
>
> 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: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org