fabriziofortino commented on code in PR #1002:
URL: https://github.com/apache/jackrabbit-oak/pull/1002#discussion_r1239571625


##########
oak-search/src/test/java/org/apache/jackrabbit/oak/plugins/index/PropertyIndexCommonTest.java:
##########
@@ -419,6 +419,28 @@ public void dateQueryWithEmptyValue() throws Exception {
         assertEventually(() -> assertQuery("select [jcr:path] from [nt:base] 
where [textField] = 'foo'", singletonList("/test/a")));
     }
 
+    @Test
+    public void inQueryWithUnparseableValue() throws Exception {
+        Tree idx = indexOptions.setIndex(
+                root,
+                "test1",
+                
indexOptions.createIndex(indexOptions.createIndexDefinitionBuilder(), false, 
"booleanField")
+        );
+        Tree booleanField = 
idx.getChild("indexRules").getChild("nt:base").getChild(PROP_NODE).getChild("booleanField");
+        booleanField.setProperty(FulltextIndexConstants.PROP_TYPE, 
PropertyType.TYPENAME_BOOLEAN);
+        root.commit();
+
+        Tree test = root.getTree("/").addChild("test");
+        test.addChild("a").setProperty("booleanField", true);
+        root.commit();
+
+        assertEventually(() -> {
+            assertQuery("select [jcr:path] from [nt:base] where [booleanField] 
in('true', 'True')", singletonList("/test/a"));
+            assertQuery("select [jcr:path] from [nt:base] where [booleanField] 
in('true', 'InvalidBool')", singletonList("/test/a"));

Review Comment:
   It has to return the same list in order to be aligned with the behavior on 
lucene.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to