You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Adrien Grand (JIRA)" <ji...@apache.org> on 2015/08/20 19:56:46 UTC
[jira] [Updated] (LUCENE-6754) Optimize IndexSearcher.count for
simple queries
[ https://issues.apache.org/jira/browse/LUCENE-6754?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Adrien Grand updated LUCENE-6754:
---------------------------------
Attachment: LUCENE-6754.patch
Here is a patch. count(MatchAllDocsQuery) returns reader.numDocs() and count(TermQuery) returns the sum of the doc freqs if there are no deletions.
> Optimize IndexSearcher.count for simple queries
> -----------------------------------------------
>
> Key: LUCENE-6754
> URL: https://issues.apache.org/jira/browse/LUCENE-6754
> Project: Lucene - Core
> Issue Type: Improvement
> Reporter: Adrien Grand
> Assignee: Adrien Grand
> Priority: Minor
> Attachments: LUCENE-6754.patch
>
>
> IndexSearcher.count currently always create a collector to compute the number of hits, but it could optimize some queries like MatchAllDocsQuery or TermQuery.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org