mirror of https://github.com/apache/lucene.git
LUCENE-7643,SOLR-10013: Reenable the single-value optimization.
This commit is contained in:
parent
5bdc492c9c
commit
6693c261e5
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue