thomasmueller commented on a change in pull request #378:
URL: https://github.com/apache/jackrabbit-oak/pull/378#discussion_r728700610
##########
File path:
oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndex.java
##########
@@ -183,6 +184,10 @@ private static boolean wrongIndex(ChildNodeEntry entry,
Filter filter, NodeState
}
// no tag matches
return true;
+ } else if (tags != null && IndexSelectionPolicy.TAG.equals(
Review comment:
I would say "tags != null && " is not needed here: let's assume someone
doesn't set any tag in the index definition, but uses selectionPolicy="tag". I
would expect that the index is never used in this case. But in your logic, it
might be used. We would also need a test case for this.
Moving String[] tags = getOptionalStrings(definition,
IndexConstants.INDEX_TAGS); is then also not needed.
##########
File path:
oak-search/src/main/java/org/apache/jackrabbit/oak/plugins/index/search/spi/query/FulltextIndexPlanner.java
##########
@@ -426,6 +427,9 @@ private boolean wrongIndex() {
}
// no tag matches
return true;
+ } else if (tags != null &&
IndexSelectionPolicy.TAG.equals(definition.getIndexSelectionPolicy())) {
Review comment:
Same as in the other case.
--
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]