PMB: Boolean expressions [$msg[197]]
Simple search

By default, the engine looks for records containing at least (!!operator_uppercase!! implicit) one of the words entered. The result is sorted by the number of word hits in descending order and then alphabetically.
E.g. cheddar cheese means records containing the words cheddar !!operator_uppercase!! cheese (Cheddar cheese, Red Leicester cheese, The history of the Cheddar region, ...).
Accented characters are ignored, uppercase words as well. If two words are separated by another sign other than space, +, or -, both words are regarded as having to figure in the search result
E.g. Cheddar cheese/Australia will be analysed as : find records containing cheddar OR records containing cheese AND australia OR both.
Some words are ignored because too frequent or having no significant meaning in English (e.g. : a, if, in, of, on, the, that, to, ...). They are referred to as stop words.

Compound words

The dash is regarded as an operator when placed between two words (see the section logical operators between two words). Hence, any compound word with a dash must be enclosed in quotation marks to make an exact term search (see further down the section Search exact terms).

Truncation

Words can be truncated to the left, right or partially using the sign *
E.g. hor* would find the words starting with hor (horse, horticulture, horror, ...), *logy would find the words ending with logy (psychology, theology, trilogy, ...), p*logy would find the words starting with p and finishing with logy (psychology, paleonthology, pathology, ...).
Several truncations can be used within one and same word.

Searching exact terms

An exact term is defined as a text enclosed in quotation marks. If the search engine encounters an exact term, it looks up occurences of the exact wording of the term. Truncation may be used within exact terms.
E.g. ''dent'' means all records containing the text dent (dentist, accident, indentation, ...).

Exact terms searching is very useful for search expressions containing spaces or punctuation marks (an acronym for example).
E.g. ''R.N.L.I.'' would find records containing the text R.N.L.I., R.N.L.I. would find records containing the words R or N or L or I.

Accents and uppercase are ignored in an exact term. Finally, exact terms can be used in all complex expressions as in the examples described further below.

Negation

The sign ~ placed before a word represents a negation of that term. It actually means search all records not containing that term at all.
E.g. ~party means find all records except those containing the word party.

Logical operators in-between two words

Logical operators may be used in-between words :

Several operators may be chained together in one and same equation or search expression. The precedence order applied is from left to right.
E.g. poetry + french - romant* means all records containing poetry !!operator_more_uppercase!! french NOT romantic.

Be careful, two operators cannot be placed immediately one after another, a negation cannot be combined with another operator (+~ expresses the same thing as the operator -).

Groupings

A search expression may be grouped so as to become a single term. Groupings are made using parentheses. They allow to change the order of precedence in the application of operators or to combine the results of complex search expressions or equations.
E.g.

Parentheses can be imbricated with one another endlessly.
E.g. (poetry + (french romantic)) (literature + XIX) means in all records containing french !!operator_uppercase!! romantic, only those containing poetry OR records containing literature !!operator_more_uppercase!! XIX

Relevance

Results are sorted by relevance and then alphabetically. Relevance is computed simply on the total number of words or exact terms hits.
E.g.

"; $operator = ($pmb_default_operator ? $msg['search_and'] : $msg['search_or']); $operator_more = ($pmb_default_operator ? $msg['search_or'] : $msg['search_and']); $content = str_replace('!!operator_uppercase!!', strtoupper($operator), $content); $content = str_replace('!!operator_lowercase!!', strtolower($operator), $content); $content = str_replace('!!operator_more_uppercase!!', strtoupper($operator_more), $content); $content = str_replace('!!operator_more_lowercase!!', strtolower($operator_more), $content); print $content; ?>