Next: , Previous: , Up: The Gnus Newsreader   [Contents][Index]

9 Searching

Gnus has various ways of finding articles that match certain criteria (from a particular author, on a certain subject, etc.). The simplest method is to enter a group and then either "limit" the summary buffer to the desired articles using the limiting commands (see Limiting), or searching through messages in the summary buffer (see Searching for Articles).

Limiting commands and summary buffer searching work on articles already fetched from the servers, and these commands won’t query the server for additional articles. While simple, these methods are therefore inadequate if the desired articles span multiple groups, or if the group is so large that fetching all articles is impractical.

It’s possible to search a backend more thoroughly using an associated search engine. Some backends come with their own search engine: IMAP servers, for instance, do their own searching. Other backends, for example a local nnmaildir installation, might require the user to manually set up some sort of search indexing. Default associations between backends and engines can be defined in gnus-search-default-engines, and engines can also be defined on a per-backend basis (see Search Engines).

Once the search engines are set up, you can search for messages in groups from one or more backends, and show the results in a group. The groups that hold search results are created on the nnselect backend, and can be either ephemeral or persistent (see Creating Search Groups).

Search queries can be specified one of two ways: either using the syntax of the engine responsible for the group you’re searching, or using Gnus’ generalized search syntax. Set the option gnus-search-use-parsed-queries to a non-nil value to used the generalized syntax. The advantage of this syntax is that, if you have multiple backends indexed by different engines, you don’t need to remember which one you’re searching—it’s also possible to issue the same query against multiple groups, indexed by different engines, at the same time. It also provides a few other conveniences including relative date parsing and tie-ins into other Emacs packages. For details on Gnus’ query language, see Search Queries.

Next: Various, Previous: Scoring, Up: The Gnus Newsreader   [Contents][Index]