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:
Michael McCandless 2013-06-26 13:28:08 +00:00
parent 2239a52453
commit 31f7bb5262
1 changed files with 3 additions and 1 deletions

View File

@ -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());