[
https://issues.apache.org/jira/browse/LUCENE-6754?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14727314#comment-14727314
]
Uwe Schindler commented on LUCENE-6754:
---------------------------------------
Let me think about the rewrite logic...!
About the other problem: I hate those instanceof checks and they always remind
me about Highlighter - which is a desaster! I was thinking about my previous
mail, I tend to think that not Query, but Weight would just get this method.
Weight already has an optimization for Bulk scoring, so I see no issue in
adding a "bulk/smart/fast counting", if there is a default implementation
available that all queries not taking care inherit automatically. Queries that
really would like to implementation are free to do so, but there is no
requirement.
I just wanted to start the discussion about this on the issue. Unfortunately I
was a bit late, but does not matter. I can make a proposal if others think the
same.
> 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
> Fix For: 5.4
>
> 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: [email protected]
For additional commands, e-mail: [email protected]