3.4. The query language

The query language processor is activated on the simple search entry when the search mode selector is set to Query Language.

Here follows a sample request that we are going to explain:

          author:"john doe" Beatles OR Lennon Live OR Unplugged -potatoes
     

This would search for all documents with John Doe appearing as a phrase in the author field (exactly what this is would depend on the document type, ie: the From: header, for an email message), and containing either beatles or lennon and either live or unplugged but not potatoes (in any part of the document).

All elements in the search entry are normally combined with an implicit AND. It is possible to specify that elements be OR'ed instead, as in Beatles OR Lennon. The OR must be entered literally (capitals), and it has priority over the AND associations: word1 word2 OR word3 means word1 AND (word2 OR word3) not (word1 AND word2) OR word3. Do not enter explicit parenthesis, they are not supported for now.

An entry preceded by a - specifies a term that should not appear.

The first element in the above exemple, author:"john doe" is a phrase search limited to a specific field. Phrase searches are specified as usual by enclosing the words in double quotes. The field specification appears before the colon (of course this is not limited to phrases, author:Balzac would be ok too). Recoll currently manages the following fields:

As of release 1.9, the filters have the possibility to create other fields with arbitrary names. No standard filters use this possibility yet.

There are two other elements which may be specified through the field syntax, but are somewhat special:

The query language is currently the only way to use the Recoll field search capability.

Words inside phrases and capitalized words are not stem-expanded. Wildcards may be used anywhere inside a term. Specifying a wild-card on the left of a term can produce a very slow search.

You can use the show query link at the top of the result list to check the exact query which was finally executed by Xapian.