Small Boolean full-text search parser. Requires Java 8 or later.
Operators (case-insensitive): NOT, AND, OR, in descending precedence. Adjacent terms imply AND. Parentheses group expressions; double quotes match literal phrases. A minus sign at the start of a term means NOT. Searches are case-insensitive substring matches, not whole-word matches.
Example: {@code BooleanSearch.compile("(rbsp OR themis) AND density")}
Compiles a query once for use against many strings.
Compiles a partially typed query for interactive search fields. Incomplete trailing operators and empty opening groups are discarded; unmatched opening parentheses are closed automatically. An unfinished quoted phrase is treated as a phrase extending to the end of the query. Other syntax errors are still reported.
Convenience method for one-off matches.