nit0906 commented on a change in pull request #465:
URL: https://github.com/apache/jackrabbit-oak/pull/465#discussion_r788481922



##########
File path: 
oak-search-elastic/src/test/java/org/apache/jackrabbit/oak/plugins/index/elastic/ElasticIndexQueryCommonTest.java
##########
@@ -57,4 +57,26 @@ public void descendantTestWithIndexTagExplain() throws 
Exception {
                 + "  where isdescendantnode([nt:base], [/test]) */]", 
result.toString());
     }
 
+    @Override
+    public String getContainsValueFortestEqualityQuery_native() {
+        return 
"\"filter\":[{\"term\":{\":ancestors\":{\"value\":\"/test\",\"boost\":1.0}}},{\"term\":{\"propa.keyword\":{\"value\":\"bar\",\"boost\":1.0}}}]";
+    }
+
+    @Override
+    public String getContainsValueFortestInequalityQuery_native() {
+        return 
"\"filter\":[{\"term\":{\":ancestors\":{\"value\":\"/test\",\"boost\":1.0}}},{\"exists\":{\"field\":\"propa\",\"boost\":1.0}},"
 +
+                
"{\"bool\":{\"must_not\":[{\"term\":{\"propa.keyword\":{\"value\":\"bar\",\"boost\":1.0}}}]";
+    }
+
+    @Override
+    public String 
getContainsValueFortestInequalityQueryWithoutAncestorFilter_native() {
+        return 
"\"filter\":[{\"exists\":{\"field\":\"propa\",\"boost\":1.0}},{\"bool\":" +
+                
"{\"must_not\":[{\"term\":{\"propa.keyword\":{\"value\":\"bar\",\"boost\":1.0}}}]";
+    }
+
+    @Override
+    public String getContainsValueFortestEqualityInequalityCombined_native() {
+        return 
"\"filter\":[{\"term\":{\":ancestors\":{\"value\":\"/test\",\"boost\":1.0}}},{\"term\":{\"propb.keyword\":{\"value\":\"world\",\"boost\":1.0}}},"
 +
+                
"{\"exists\":{\"field\":\"propa\",\"boost\":1.0}},{\"bool\":{\"must_not\":[{\"term\":{\"propa.keyword\":{\"value\":\"bar\",\"boost\":1.0}}}]";
+    }

Review comment:
       @averma21  - yes there are multiple tests. 
   testEqualityQuery_native - > tests simple equality condition
   testEqualityInequalityCombined_native -> equality and inequality
   testInequalityQuery_native -> tests inequality with nodes created with this 
property and also without this property.
   
   So effectively the condition that x<>1 should return nodes where x is set 
and not equal to 1 is being tested. I hope this is what you were asking for - 
right ?




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