lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikemcc...@apache.org
Subject svn commit: r1496925 - in /lucene/dev/trunk: ./ lucene/ lucene/facet/ lucene/facet/src/java/org/apache/lucene/facet/search/DrillSidewaysQuery.java
Date Wed, 26 Jun 2013 13:28:09 GMT
Author: mikemccand
Date: Wed Jun 26 13:28:08 2013
New Revision: 1496925

URL: http://svn.apache.org/r1496925
Log:
fix silly perf bug in DrillSideways (we don't need freqs from the DocsEnum); add missing null

Modified:
    lucene/dev/trunk/   (props changed)
    lucene/dev/trunk/lucene/   (props changed)
    lucene/dev/trunk/lucene/facet/   (props changed)
    lucene/dev/trunk/lucene/facet/src/java/org/apache/lucene/facet/search/DrillSidewaysQuery.java

Modified: lucene/dev/trunk/lucene/facet/src/java/org/apache/lucene/facet/search/DrillSidewaysQuery.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/facet/src/java/org/apache/lucene/facet/search/DrillSidewaysQuery.java?rev=1496925&r1=1496924&r2=1496925&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/facet/src/java/org/apache/lucene/facet/search/DrillSidewaysQuery.java
(original)
+++ lucene/dev/trunk/lucene/facet/src/java/org/apache/lucene/facet/search/DrillSidewaysQuery.java
Wed Jun 26 13:28:08 2013
@@ -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());



Mime
View raw message