nit0906 commented on a change in pull request #465:
URL: https://github.com/apache/jackrabbit-oak/pull/465#discussion_r787434446
##########
File path:
oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/LucenePropertyIndex.java
##########
@@ -1237,13 +1238,18 @@ private static Query createQuery(String propertyName,
PropertyRestriction pr,
} else if (pr.isNotNullRestriction()) {
// not null. For date lower bound of zero can be used
return NumericRangeQuery.newLongRange(propertyName, 0L,
Long.MAX_VALUE, true, true);
+ } else if (pr.isNot && pr.not != null) {
+ // -[property]=[value]
+ BooleanQuery bool = new BooleanQuery();
+ // This will exclude entries with [property]=[value]
+ bool.add(NumericRangeQuery.newLongRange(propertyName,
pr.not.getValue(LONG), pr.not.getValue(LONG), true, true), MUST_NOT);
Review comment:
good catch. Thanks. Fixed it now -
https://github.com/apache/jackrabbit-oak/pull/465/commits/b45147efafc2fe77c2b576e1ebe1672426256838
--
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]