Next: , Previous: , Up: Setting up nnir   [Contents][Index]

8.1.3.2 The imap Engine

The imap engine requires no configuration.

Queries using the imap engine follow a simple query language. The search is always case-insensitive and supports the following features (inspired by the Google search input language):

Boolean query operators

AND, OR, and NOT are supported, and parentheses can be used to control operator precedence, e.g., (emacs OR xemacs) AND linux. Note that operators must be written with all capital letters to be recognized. Also preceding a term with a - sign is equivalent to NOT term.

Automatic AND queries

If you specify multiple words then they will be treated as an AND expression intended to match all components.

Phrase searches

If you wrap your query in double-quotes then it will be treated as a literal string.

By default the whole message will be searched. The query can be limited to a specific part of a message by using a prefix-arg. After inputting the query this will prompt (with completion) for a message part. Choices include “Whole message”, “Subject”, “From”, and “To”. Any unrecognized input is interpreted as a header name. For example, typing Message-ID in response to this prompt will limit the query to the Message-ID header.

Finally selecting “Imap” will interpret the query as a raw IMAP search query. The format of such queries can be found in RFC3501.

If you don’t like the default of searching whole messages you can customize nnir-imap-default-search-key. For example to use IMAP queries by default

(setq nnir-imap-default-search-key "Imap")

Next: , Previous: , Up: Setting up nnir   [Contents][Index]