mirror of https://github.com/apache/lucene.git
fix silly perf bug in DrillSideways (we don't need freqs from the DocsEnum); add missing null
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1496925 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
2239a52453
commit
31f7bb5262
|
@ -119,6 +119,8 @@ class DrillSidewaysQuery extends Query {
|
|||
Terms terms = reader.terms(field);
|
||||
if (terms != null) {
|
||||
termsEnum = terms.iterator(null);
|
||||
} else {
|
||||
termsEnum = null;
|
||||
}
|
||||
lastField = field;
|
||||
}
|
||||
|
@ -129,7 +131,7 @@ class DrillSidewaysQuery extends Query {
|
|||
}
|
||||
for(int i=0;i<drillDownTerms[dim].length;i++) {
|
||||
if (termsEnum.seekExact(drillDownTerms[dim][i].bytes(), false)) {
|
||||
DocsEnum docsEnum = termsEnum.docs(null, null);
|
||||
DocsEnum docsEnum = termsEnum.docs(null, null, 0);
|
||||
if (docsEnum != null) {
|
||||
dims[dim].docsEnums[i] = docsEnum;
|
||||
dims[dim].maxCost = Math.max(dims[dim].maxCost, docsEnum.cost());
|
||||
|
|
Loading…
Reference in New Issue