Victor Chenal created SOLR-14215: ------------------------------------ Summary: Improve performance of SolrFeature when there are no filter queries Key: SOLR-14215 URL: https://issues.apache.org/jira/browse/SOLR-14215 Project: Solr Issue Type: Improvement Security Level: Public (Default Security Level. Issues are Public) Reporter: Victor Chenal
In cases where a SolrFeature only contains a main query {{q}} and no filter queries {{fq}}, it is possible to traverse documents using the doc iterator from {{q}} instead of constructing one from a processed filter that combines all of the queries. In our test datasets this made retrieving the feature *10 times faster*. Specifically, the call to [{{getProcessedFilter}}|https://github.com/apache/lucene-solr/blob/16e537db7efe37eb7519b07dc96c5026c0a1d193/solr/contrib/ltr/src/java/org/apache/solr/ltr/feature/SolrFeature.java#L242-L243] inside {{getDocIdSetIteratorFromQueries}} is expensive. That method aims at returning a doc iterator that traverses over the documents that match all of the criteria of {{q}} and {{fq}}. When there are no filter queries (i.e. {{fq}} is null or empty), this just returns a doc iterator for {{q}}. Using the iterator from that query directly is a lot faster. -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org