the pattern must match the property value exactly,

when matching property values to the query. This is important when
you have a property value that is a prefix of another property value,
e.g., AuditService.logEvent and AuditService.logEvents.
This commit is contained in:
2018-09-13 07:55:13 +02:00
parent 2e433ba969
commit c6a1291ee6

View File

@@ -165,7 +165,7 @@ public class ExpressionToDocIdVisitor extends ExpressionVisitor<IntList> {
final Map<String, IntList> valueToDocId = keyToValueToDocId.getOrDefault(propertyName, EMPTY_VALUES);
for (final Entry<String, IntList> entry : valueToDocId.entrySet()) {
if (valuePattern.matcher(entry.getKey()).find()) {
if (valuePattern.matcher(entry.getKey()).matches()) {
result.add(entry.getValue());
}
}