Search operator
A search operator specifies how the comparison of a search value and a zettel should be executed. Every comparison is done case-insensitive, treating all uppercase letters the same as lowercase letters.
The following are allowed search operator characters:
- The exclamation mark character (
!
, U+0021) negates the meaning - The tilde character (
~
, U+007E) compares on matching (match operator
) - The greater-than sign character (
>
, U+003E) matches if there is some prefix (prefix operator
) - The less-than sign character (
<
, U+003C) compares a suffix relationship (suffix operator
) - The colon character (
:
, U+003A) compares on equal words (has operator
) - The question mark (
?
, U+003F) checks for an existing metadata key (exist operator
)
Since the exclamation mark character can be combined with the other, there are 10 possible combinations:
!
: is an abbreviation of the!~
operator.~
: is successful if the search value matched the value to be compared.!~
: is successful if the search value does not match the value to be compared.:
: is successful if the search value is equal to one word of the value to be compared.!:
: is successful if the search value is not equal to any word of the value to be compared.>
: is successful if the search value is a prefix of the value to be compared.!>
: is successful if the search value is not a prefix of the value to be compared.<
: is successful if the search value is a suffix of the value to be compared.!<
: is successful if the search value is not a suffix of the value to be compared.?
: is successful if the metadata contains the given key.!?
: is successful if the metadata does not contain the given key.: a missing search operator can only occur for a full-text search. It is equal to the
~
operator.