lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <>
Subject [GitHub] [lucene-solr] jtibshirani commented on a change in pull request #715: LUCENE-7714 Add a range query that takes advantage of index sorting.
Date Tue, 18 Jun 2019 15:03:01 GMT
jtibshirani commented on a change in pull request #715: LUCENE-7714 Add a range query that
takes advantage of index sorting.

 File path: lucene/sandbox/src/java/org/apache/lucene/search/
 @@ -0,0 +1,305 @@
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+import java.util.Objects;
+import java.util.function.Function;
+import java.util.function.Supplier;
+import com.carrotsearch.randomizedtesting.annotations.Repeat;
+import org.apache.lucene.index.DocValues;
+import org.apache.lucene.index.IndexReader;
+import org.apache.lucene.index.LeafReader;
+import org.apache.lucene.index.LeafReaderContext;
+import org.apache.lucene.index.NumericDocValues;
+import org.apache.lucene.index.SortedNumericDocValues;
+ * A range query that can take advantage of the fact that the index is sorted to speed up
+ * execution. If the index is sorted on the same field as the query, it performs binary
+ * search on the field's {@link SortedNumericDocValues} to find the documents at the lower
+ * and upper ends of the range.
+ * 
+ * This optimized execution strategy is only used if the following conditions hold:
+ * - The index is sorted, and its primary sort is on the same field as the query.
+ * - The segments must have at most one field value per document (otherwise we cannot easily
 Review comment:

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:

With regards,
Apache Git Services

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message