]> Sergey Matveev's repositories - public-inbox.git/blob - Documentation/lei-q.pod
doc: lei-q: note "-a" and link to Xapian QueryParser
[public-inbox.git] / Documentation / lei-q.pod
1 =head1 NAME
2
3 lei-q - search for messages matching terms
4
5 =head1 SYNOPSIS
6
7 lei q [OPTIONS] TERM [TERM...]
8
9 =head1 DESCRIPTION
10
11 Search for messages across the lei store and externals.
12
13 TODO: Give common prefixes, or at least a description/reference.
14
15 =head1 OPTIONS
16
17 =over
18
19 =item -o PATH, --output=PATH, --mfolder=PATH
20
21 Destination for results (e.g., C<path/to/Maildir> or - for stdout).
22
23 Default: -
24
25 =item -f FORMAT, --format=FORMAT
26
27 Format of results: C<maildir>, C<mboxrd>, C<mboxcl2>, C<mboxcl>,
28 C<mboxo>, C<json>, C<jsonl>, or C<concatjson>.  The default format
29 used depends on C<--output>.
30
31 TODO: Provide description of formats?
32
33 =item --pretty
34
35 Pretty print C<json> or C<concatjson> output.  If stdout is opened to
36 a tty and used as the C<--output> destination, C<--pretty> is enabled
37 by default.
38
39 =item --mua-cmd=COMMAND, --mua=COMMAND
40
41 A command to run on C<--output> Maildir or mbox (e.g., C<mutt -f %f>).
42 For a subset of MUAs known to accept a mailbox via C<-f>, COMMAND can
43 be abbreviated to the name of the program: C<mutt>, C<mailx>, C<mail>,
44 or C<neomutt>.
45
46 =item -a, --augment
47
48 Augment output destination instead of clobbering it.
49
50 =item -t, --thread
51
52 Return all messages in the same thread as the actual match(es).
53
54 =item -d STRATEGY, --dedupe=STRATEGY
55
56 Strategy for deduplicating messages: C<content>, C<oid>, C<mid>, or
57 C<none>.
58
59 Default: C<content>
60
61 TODO: Provide description of strategies?
62
63 =item --[no-]remote
64
65 Whether to include results requiring network access.  When local
66 externals are configured, C<--remote> must be explicitly passed to
67 enable reporting of results from remote externals.
68
69 =item --no-local
70
71 Limit operations to those requiring network access.
72
73 =item --no-external
74
75 Don't include results from externals.
76
77 =item -NUMBER, -n NUMBER, --limit=NUMBER
78
79 Limit the number of matches.
80
81 Default: 10000
82
83 =item --offset=NUMBER
84
85 Shift start of search results.
86
87 Default: 0
88
89 =item -r, --reverse
90
91 Reverse the results.  Note that this applies before C<--limit>.
92
93 =item -s KEY, --sort=KEY
94
95 Order the results by KEY.  Valid keys are C<received>, C<relevance>,
96 and C<docid>.
97
98 Default: C<received>
99
100 =item -v, --verbose
101
102 Provide more feedback on stderr.
103
104 =item --torsocks=auto|no|yes, --no-torsocks
105
106 Whether to wrap L<git(1)> and L<curl(1)> commands with torsocks.
107
108 Default: C<auto>
109
110 =back
111
112 =head1 CONTACT
113
114 Feedback welcome via plain-text mail to L<mailto:meta@public-inbox.org>
115
116 The mail archives are hosted at L<https://public-inbox.org/meta/>
117 and L<http://hjrcffqmbrq6wope.onion/meta/>
118
119 =head1 COPYRIGHT
120
121 Copyright 2021 all contributors L<mailto:meta@public-inbox.org>
122
123 License: AGPL-3.0+ L<https://www.gnu.org/licenses/agpl-3.0.txt>
124
125 =head1 SEE ALSO
126
127 L<lei-add-external(1)>,
128 L<Xapian::QueryParser Syntax|https://xapian.org/docs/queryparser.html>