romseygeek commented on code in PR #12109:
URL: https://github.com/apache/lucene/pull/12109#discussion_r1085097916


##########
lucene/memory/src/test/org/apache/lucene/index/memory/TestMemoryIndex.java:
##########
@@ -793,4 +793,42 @@ private static boolean arrayBinaryContains(BytesRef[] 
array, BytesRef value) {
     }
     return false;
   }
+
+  public void testIntegerNumericDocValue() throws IOException {
+    // MemoryIndex used to fail when doc values are enabled and numericValue() 
returns an Integer
+    // such as with IntField.
+    FieldType ft = new FieldType();
+    ft.setDocValuesType(DocValuesType.NUMERIC);
+    ft.freeze();
+    Field field =
+        new Field("field", ft) {
+          {
+            fieldsData = 35;
+          }
+        };
+
+    FieldType multiFt = new FieldType();
+    multiFt.setDocValuesType(DocValuesType.SORTED_NUMERIC);
+    multiFt.freeze();
+    Field multiField =
+        new Field("multi_field", multiFt) {
+          {
+            fieldsData = 35;
+          }
+        };

Review Comment:
   Is it worth explicitly adding a test for IntField here as well?



-- 
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-unsubscr...@lucene.apache.org

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


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

Reply via email to