brandwatch boolean search query linter and language server written in rust.
cargo install bwq
# lint directory (recursively) or specific file(s)
bwq check # lint all `.bwq` files in the current directory (and subdirectories)
bwq check path/to/queries/ # lint all `.bwq` files in `path/to/queries/` (and subdirectories)
bwq check path/to/query.bwq # lint `query.bwq`
bwq check path/to/queries/*.txt # lint all `.txt` files in `path/to/queries/`
# lint query strings directly
bwq check --query "term1 AND wildcardterm*"
# lint both .txt and .bwq files in current directory (and subdirectories)
bwq check -e txt -e bwq
# show all options
bwq check --help
- boolean:
AND
,OR
,NOT
- proximity:
~
,NEAR/x
,NEAR/xf
- wildcards:
*
,?
- fields:
title:
,site:
,rating:[1 TO 5]
- special:
{case}
,#hashtag
,@mention
,<<<comments>>>
run bwq examples
for more