1 <h1>NOTMUCH-SEARCH(1)</h1>
6 notmuch-search - Search for messages matching the given search terms.
12 <b>notmuch</b> <b>search</b> [<u>options</u>...] <<u>search-term</u>>...
18 Search for messages matching the given search terms, and display as
19 results the threads containing the matched messages.
23 The output consists of one line per thread, giving a thread ID, the
24 date of the newest (or oldest, depending on the sort option) matched
25 message in the thread, the number of matched messages and total mes-
26 sages in the thread, the names of all participants in the thread, and
27 the subject of the newest (or oldest) message.
31 See <b>notmuch-search-terms</b>(7) for details of the supported syntax for
36 Supported options for <b>search</b> include
40 <b>--format=</b>(<b>json</b>|<b>text</b>)
44 Presents the results in either JSON or plain-text (default).
48 <b>--output=(summary|threads|messages|files|tags)</b>
56 Output a summary of each thread with any message matching
57 the search terms. The summary includes the thread ID, date,
58 the number of messages in the thread (both the number
59 matched and the total number), the authors of the thread
68 Output the thread IDs of all threads with any message
69 matching the search terms, either one per line (--for-
70 mat=text) or as a JSON array (--format=json).
78 Output the message IDs of all messages matching the search
79 terms, either one per line (--format=text) or as a JSON
80 array (--format=json).
88 Output the filenames of all messages matching the search
89 terms, either one per line (--format=text) or as a JSON
90 array (--format=json).
98 Output all tags that appear on any message matching the
99 search terms, either one per line (--format=text) or as a
100 JSON array (--format=json).
104 <b>--sort=</b>(<b>newest-first</b>|<b>oldest-first</b>)
108 This option can be used to present results in either chronolog-
109 ical order (<b>oldest-first</b>) or reverse chronological order
110 (<b>newest-first</b>).
114 Note: The thread order will be distinct between these two
115 options (beyond being simply reversed). When sorting by <b>old-</b>
116 <b>est-first</b> the threads will be sorted by the oldest message in
117 each thread, but when sorting by <b>newest-first</b> the threads will
118 be sorted by the newest message in each thread.
122 By default, results will be displayed in reverse chronological
123 order, (that is, the newest results will be displayed first).
131 Skip displaying the first N results. With the leading '-',
132 start at the Nth result from the end.
140 Limit the number of displayed results to N.
144 <b>--exclude=(true|false|flag)</b>
148 Specify whether to omit messages matching search.tag_exclude
149 from the search results (the default) or not. The extra option
150 <b>flag</b> only has an effect when <b>--output=summary</b> In this case all
151 matching threads are returned but the "match count" is the num-
152 ber of matching non-excluded messages in the thread.
158 <b>notmuch</b>(1), <b>notmuch-config</b>(1), <b>notmuch-count</b>(1), <b>notmuch-dump</b>(1), <b>not-</b>
159 <b>much-hooks</b>(5), <b>notmuch-new</b>(1), <b>notmuch-reply</b>(1), <b>notmuch-restore</b>(1),
160 <b>notmuch-search-terms</b>(7), <b>notmuch-show</b>(1), <b>notmuch-tag</b>(1)
163 <h2>Notmuch 0.13.2</h2>