You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Hoss Man (JIRA)" <ji...@apache.org> on 2017/05/23 04:48:04 UTC

[jira] [Created] (SOLR-10732) potential optimizations in callers of SolrIndexSearcher.numDocs when docset is empty

Hoss Man created SOLR-10732:
-------------------------------

             Summary: potential optimizations in callers of SolrIndexSearcher.numDocs when docset is empty
                 Key: SOLR-10732
                 URL: https://issues.apache.org/jira/browse/SOLR-10732
             Project: Solr
          Issue Type: Improvement
      Security Level: Public (Default Security Level. Issues are Public)
            Reporter: Hoss Man


spin off of SOLR-10727...

{quote}
...why not (also) optimize it slightly higher up and completely avoid the construction of the Query objects? (and in some cases: additional overhead)

for example: the first usage of {{SolrIndexSearcher.numDocs(Query,DocSet)}} i found was {{RangeFacetProcessor.rangeCount(DocSet subset,...)}} ... if the first line of that method was {{if (0 == subset.size()) return 0}} then we'd not only optimize away the SolrIndexSearcher hit, but also fetching the SchemaField & building the range query (not to mention the much more expensive {{getGroupedFacetQueryCount}} in the grouping case)

At a glance, most other callers of {{SolrIndexSearcher.numDocs(Query,DocSet)}} could be trivially optimize this way as well -- at a minimum to eliminate Query parsing/construction.

{quote}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org