mirror of https://github.com/apache/lucene.git
SOLR-5012: optimize search with filter when filterCache is null
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1501004 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
5b257ac4df
commit
20a6de0241
|
@ -291,6 +291,8 @@ Optimizations
|
|||
|
||||
* SOLR-5002: optimize numDocs(Query,DocSet) when filterCache is null (Robert Muir)
|
||||
|
||||
* SOLR-5012: optimize search with filter when filterCache is null (Robert Muir)
|
||||
|
||||
Other Changes
|
||||
----------------------
|
||||
|
||||
|
|
|
@ -956,6 +956,15 @@ public class SolrIndexSearcher extends IndexSearcher implements Closeable,SolrIn
|
|||
}
|
||||
}
|
||||
|
||||
if (filterCache == null) {
|
||||
// there is no cache: don't pull bitsets
|
||||
if (notCached == null) notCached = new ArrayList<Query>(sets.length-end);
|
||||
WrappedQuery uncached = new WrappedQuery(q);
|
||||
uncached.setCache(false);
|
||||
notCached.add(uncached);
|
||||
continue;
|
||||
}
|
||||
|
||||
Query posQuery = QueryUtils.getAbs(q);
|
||||
sets[end] = getPositiveDocSet(posQuery);
|
||||
// Negative query if absolute value different from original
|
||||
|
|
Loading…
Reference in New Issue