A query consists of one or more query conditions. They can be connected with AND, OR or NOT. Leaving out the boolean connector means connecting with OR. The NOT connector takes the meaning of AND NOT.
query -> or_expression or_operator query
or_expression query
or_expression
or_expression -> and_expression and_operator or_expression
and_expression not_operator or_expression
and_expression
A query condition can be:
and_expression -> `(' query `)'
field_expression
`'' s_literal_expression `''
`"' d_literal_expression `"'
proximity_expression
atleast_expression
index_expression
term
wildcard_term
Boolean operators can be specified in various languages:
or_operator -> `or'
`ou'
`oder'
`oppure'
`o'
`of'
and_operator -> `and'
`et'
`und'
`e'
`y'
`en'
not_operator -> `not'
`non'
`nicht'
`non'
`no'
`niet'
The class s_character consists of all printable characters
without the single quote itself (`''), analogous the class
d_character consists of all printable characters
without the single double quote itself (`"').
s_literal_expression -> s_character s_literal_expression
s_character
d_literal_expression -> d_character d_literal_expression
d_character
Proximity expressions consist of two operands (terms) and a proximity operator. The proximity operator consists of `w/' or `pre/' and a number denoting a word distance.
num1 may be any natural number greater than zero.
proximity_expression -> term `pre/' num1 term
term `w/' num1 term
Atleast expressions consist of one operand (term) and the
atleast/ operator with a number denoting the minimum occurance
frequency of the term in a matching document.
atleast_expression -> `atleast/' num1 term
Various indextypes can be used as similarity predicates. They can be specified for single terms as well as for more complex query parts.
index_expression -> indextype term
indextype_list { query }
indextype_list -> indextype, indextype_list
indextype
indextype -> indextype_text
indextype_soundex
indextype_phonix
indextype_text -> `text'
`plain'
`strikt'
`genau'
`exacto'
indextype_soundex -> `soundex'
`ähnlich'
indextype_phonix -> `phonix'
A term consists of a list of characters (not including the characters
`<', `>', `=', `(', `)', `{', `}',
`/', `,' and any whitespace which are interpreted as word
delimiters). A wildcard_term is a term followed by an asterisk
(`*').
term -> char_list
wildcard_term -> char_list `*'
char_list -> character char_list
character
Field expressions are used to search within special fields. A
non_field_expression is the same as query except that a
field_expression mustn't occur.
field_expression -> field num_predicate num_term
field `=' non_field_expression
A num_term is an integer or a real value. With numeric fields
various comparison predicates can be used.
num_predicate -> `<'
`<='
`='
`=='
`>='
`>'