diff --git a/lucene/core/src/java/org/apache/lucene/document/SortedNumericDocValuesRangeQuery.java b/lucene/core/src/java/org/apache/lucene/document/SortedNumericDocValuesRangeQuery.java index d5f75a76d74..18805b287c0 100644 --- a/lucene/core/src/java/org/apache/lucene/document/SortedNumericDocValuesRangeQuery.java +++ b/lucene/core/src/java/org/apache/lucene/document/SortedNumericDocValuesRangeQuery.java @@ -19,6 +19,7 @@ package org.apache.lucene.document; import java.io.IOException; import java.util.Objects; +import org.apache.lucene.index.DocValues; import org.apache.lucene.index.IndexReader; import org.apache.lucene.index.LeafReader; import org.apache.lucene.index.LeafReaderContext; @@ -99,11 +100,9 @@ abstract class SortedNumericDocValuesRangeQuery extends Query { if (values == null) { return null; } - final NumericDocValues singleton = null; // TODO: LUCENE-7649, re-consider optimization that broke SOLR-10013 - // final NumericDocValues singleton = DocValues.unwrapSingleton(values); + final NumericDocValues singleton = DocValues.unwrapSingleton(values); final TwoPhaseIterator iterator; if (singleton != null) { - assert false : "imposible code -- or: someone re-enabled singleton optinization w/o reading the whole method"; iterator = new TwoPhaseIterator(singleton) { @Override public boolean matches() throws IOException {