I would like to search over a string in java using search engine like syntax.
For example:
String: foo baz bar
Search query: "foo bar" OR baz
Result would be TRUE or found because the string 'baz' exist even though it couldn't find exact match of "foo bar"
Other query examples:
(foo OR baz) AND bar
foo -bar
-"foo bar" AND baz
Is there a library in JAVA that already does that and supports 'AND', 'OR', '-' and parentheses syntax?