Better search behaviour including case insensitivity.
@@ -186,13 +186,21 @@ public class SparqlMatcherActor extends UntypedActor {
searchPath,
textSearchTarget.asNode()));
+ Expr filterExpression = Arrays.stream(searchString.toLowerCase().split(" "))
+ .<Expr>map(searchPart ->
+ new E_StrContains(
+ new E_StrLowerCase(new ExprVar(textSearchTarget)),
+ new NodeValueString(searchPart)
+ )
+ )
+ .reduce((left, right) -> new E_LogicalOr(left, right))
+ .orElse(new NodeValueBoolean(true));
+
+
return OpFilter.filterBy(
new ExprList(
- new E_StrContains(
- new ExprVar(textSearchTarget),
- new NodeValueString(searchString)
- )
+ filterExpression
),
pathOp
);
