You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by mi...@apache.org on 2013/07/03 17:18:39 UTC

svn commit: r1499439 - /lucene/dev/trunk/lucene/facet/src/java/org/apache/lucene/facet/range/RangeAccumulator.java

Author: mikemccand
Date: Wed Jul  3 15:18:39 2013
New Revision: 1499439

URL: http://svn.apache.org/r1499439
Log:
add TODO

Modified:
    lucene/dev/trunk/lucene/facet/src/java/org/apache/lucene/facet/range/RangeAccumulator.java

Modified: lucene/dev/trunk/lucene/facet/src/java/org/apache/lucene/facet/range/RangeAccumulator.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/facet/src/java/org/apache/lucene/facet/range/RangeAccumulator.java?rev=1499439&r1=1499438&r2=1499439&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/facet/src/java/org/apache/lucene/facet/range/RangeAccumulator.java (original)
+++ lucene/dev/trunk/lucene/facet/src/java/org/apache/lucene/facet/range/RangeAccumulator.java Wed Jul  3 15:18:39 2013
@@ -95,6 +95,10 @@ public class RangeAccumulator extends Fa
         int doc = 0;
         while (doc < length && (doc = hits.bits.nextSetBit(doc)) != -1) {
           long v = ndv.get(doc);
+          // TODO: if all ranges are non-overlapping, we
+          // should instead do a bin-search up front
+          // (really, a specialized case of the interval
+          // tree)
           // TODO: use interval tree instead of linear search:
           for(int j=0;j<ranges.ranges.length;j++) {
             if (ranges.ranges[j].accept(v)) {