You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2022/04/01 00:45:56 UTC

[GitHub] [lucene] reta commented on a change in pull request #749: LUCENE-10466: IndexSortSortedNumericDocValuesRangeQuery unconditionally assumes the usage of the LONG-encoded SortField

reta commented on a change in pull request #749:
URL: https://github.com/apache/lucene/pull/749#discussion_r840135295



##########
File path: lucene/sandbox/src/test/org/apache/lucene/sandbox/search/TestIndexSortSortedNumericDocValuesRangeQuery.java
##########
@@ -155,15 +156,23 @@ public void testToString() {
   }
 
   public void testIndexSortDocValuesWithEvenLength() throws Exception {
-    testIndexSortDocValuesWithEvenLength(false);
-    testIndexSortDocValuesWithEvenLength(true);
+    final SortField.Type type =
+        RandomPicks.randomFrom(
+            random(),
+            new SortField.Type[] {
+              SortField.Type.INT, SortField.Type.LONG, SortField.Type.DOUBLE, SortField.Type.FLOAT

Review comment:
       > I think it'd be best to split out the DOUBLE and FLOAT checks into its own test that checks the optimization is deactivated (like testNoIndexSort)
   
   Sure, will do that
   
   > That way if someone breaks the query with integers, they'll know right away, instead of maybe having to run the tests a couple times before they fail!
   
   That was initially done like that, @nknize asked me to go with `Random`,  see please https://github.com/apache/lucene/pull/749#discussion_r831316035




-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org