The library helps to parse search queries (e.g. custom search boxes) and enables custom search index implementations.
Supported expressions:
a AND b
or a b
a OR b OR c
-a
or NOT a
(a b) OR (c d)
abc
or "words in close proximity"
[1 TO 20]
(inclusive), ]aaa TO dzz[
(exclusive), or [1 TO 20[
(mixed)field:(a b)
or field:abc
year < 2000
A simple usage example:
import 'package:query/query.dart';
main() {
final q = parseQuery('some text OR field:another');
// prints "(some (text OR field:another))"
print(q);
}