]> git.cworth.org Git - notmuch-wiki/blob - manpages/notmuch-reindex-1.mdwn
complete sentence
[notmuch-wiki] / manpages / notmuch-reindex-1.mdwn
1 <h1>NOTMUCH-REINDEX(1)</h1>
2
3 <h2>NAME</h2>
4 <pre>
5        notmuch-reindex - re-index matching messages
6 </pre>
7
8 <h2>SYNOPSIS</h2>
9 <pre>
10        <b>notmuch</b> <b>reindex</b> [<u>option</u> ...] &lt;<u>search-term</u>&gt; ...
11 </pre>
12
13 <h2>DESCRIPTION</h2>
14 <pre>
15        Re-index all messages matching the search terms.
16
17        See  <a href='../notmuch-search-terms-7/'>notmuch-search-terms</a>(7)  for  details  of the supported syntax for
18        &lt;<u>search-term</u>&gt;.
19
20        The <b>reindex</b> command searches for all  messages  matching  the  supplied
21        search  terms, and re-creates the full-text index on these messages us‐
22        ing the supplied options.
23
24        Supported options for <b>reindex</b> include
25
26        <b>--decrypt=(true|nostash|auto|false)</b>
27               If <b>true</b>, when encountering an encrypted message, try to  decrypt
28               it  while  reindexing, stashing any session keys discovered.  If
29               <b>auto</b>, and notmuch already knows about a session key for the mes‐
30               sage, it will try decrypting using that session key but will not
31               try to access the user&apos;s secret keys.  If decryption is success‐
32               ful, index the cleartext itself.
33
34               <b>nostash</b>  is  the  same  as  <b>true</b>  except  that it will not stash
35               newly-discovered session keys in the database.
36
37               If <b>false</b>, notmuch reindex will also delete any  stashed  session
38               keys for all messages matching the search terms.
39
40               Be aware that the index is likely sufficient (and a stashed ses‐
41               sion key is certainly sufficient) to reconstruct  the  cleartext
42               of the message itself, so please ensure that the notmuch message
43               index is adequately protected.  DO  NOT  USE  <b>--decrypt=true</b>  or
44               <b>--decrypt=nostash</b>  without  considering the security of your in‐
45               dex.
46
47               See also <b>index.decrypt</b> in <a href='../notmuch-config-1/'>notmuch-config</a>(1).
48 </pre>
49
50 <h2>EXAMPLES</h2>
51 <pre>
52        A user just received an encrypted message without indexing its  cleart‐
53        ext.   After  reading it (via <b>notmuch</b> <b>show</b> <b>--decrypt=true</b>), they decide
54        that they want to index its cleartext so that they can easily  find  it
55        later and read it without having to have access to their secret keys:
56
57           notmuch reindex --decrypt=true id:1234567@example.com
58
59        A  user  wants  to  change their policy going forward to start indexing
60        cleartext.  But they also want indexed access to the cleartext  of  all
61        previously-received  encrypted  messages.  Some messages might have al‐
62        ready been indexed in the clear (as in the example above). They can ask
63        notmuch to just reindex the not-yet-indexed messages:
64
65           notmuch config set index.decrypt true
66           notmuch reindex tag:encrypted and not property:index.decryption=success
67
68        Later,  the user changes their mind, and wants to stop indexing cleart‐
69        ext (perhaps their threat model has changed, or their  trust  in  their
70        index store has been shaken).  They also want to clear all of their old
71        cleartext from the index.  Note that they compact the  database  after‐
72        ward as a workaround for <u>https://trac.xapian.org/ticket/742</u>:
73
74           notmuch config set index.decrypt false
75           notmuch reindex property:index.decryption=success
76           notmuch compact
77 </pre>
78
79 <h2>SEE ALSO</h2>
80 <pre>
81        <a href='../notmuch-1/'>notmuch</a>(1),  <a href='../notmuch-compact-1/'>notmuch-compact</a>(1),  <a href='../notmuch-config-1/'>notmuch-config</a>(1),  <a href='../notmuch-count-1/'>notmuch-count</a>(1),
82        <a href='../notmuch-dump-1/'>notmuch-dump</a>(1), <a href='../notmuch-hooks-5/'>notmuch-hooks</a>(5),  <a href='../notmuch-insert-1/'>notmuch-insert</a>(1),  <a href='../notmuch-new-1/'>notmuch-new</a>(1),
83        <a href='../notmuch-reply-1/'>notmuch-reply</a>(1),     <a href='../notmuch-restore-1/'>notmuch-restore</a>(1),    <a href='../notmuch-search-1/'>notmuch-search</a>(1),    <a href='../notmuch-search-terms-7/'>not‐</a>
84        <a href='../notmuch-search-terms-7/'>much-search-terms</a>(7), <a href='../notmuch-show-1/'>notmuch-show</a>(1), <a href='../notmuch-tag-1/'>notmuch-tag</a>(1)
85 </pre>
86
87 <h2>AUTHOR</h2>
88 <pre>
89        Carl Worth and many others
90 </pre>
91
92 <h2>COPYRIGHT</h2>
93 <pre>
94        2009-2022, Carl Worth and many others
95 </pre>
96
97 <h2>0.35</h2>