Rules
- Spaces are insignificant by default. For example,
field = helloandfield=helloare both valid. - If spaces are significant, they need to be inside double quotes, for example,
field = "hello world" - Special characters need to be escaped with a backslash:
field="hello\" world".
Full list of special characters:\ * ~ ! & = > < $ ^ | " ' ( ) ] [ / - Use
&and|for boolean operations:foo = 1 | baz = 2 & bar = 3. Boolean Algebra Logic is assumed:&takes precedence over|. When evaluating the condition above,baz = 2 & bar = 3will be computed first, and then the result will beor’ed withfoo=1 - Parentheses can be used to specify the order of operations. In the example above, to make sure
that
foo = 1 | baz = 2is evaluated first, parentheses must be placed(foo = 1 | baz = 2) & bar = 3
Grammar
Simple Types
| Definition | Property Types | Operator | Examples |
|---|---|---|---|
| exact match | all | = | content = "hello world" content=hello |
| starts with | text | =^ | content =^ he |
| ends with | text | =$ | content =$ llo |
| contains | text | =~ | content =~ lo |
| greater than | int32, int64, float, double, decimal, date, datetime | > | count > 1 |
| greater than or equal to | int32, int64, float, double, decimal, date, datetime | >= | content >= 1 |
| less than | int32, int64, float, double, decimal, date, datetime | < | count < 1 |
| less than or equal to | int32, int64, float, double, decimal, date, datetime | <= | content <= 1 |
| is NULL | all | !=* | content != * |
| is not NULL | all | =* | content = * |
| is empty | text | ="" | content = "" |
| negation | all | ! | content != ”hello world” !(content = ”hello world”) !(content =^ “hello world”) |
Collections (all types)
| Definition | Operator | Example |
|---|---|---|
| exact match with ordering | = | industries = [Healthcare,Fintech] |
| contains all | =~ | industries =~ [Healthcare,Fintech] |
| empty | =[] | industries =[] |
| negation | ! | !(industries = [Healthcare,Fintech]) |