Blob


1 .\" Copyright (c) 2022 Omar Polo <op@openbsd.org>
2 .\"
3 .\" Permission to use, copy, modify, and distribute this software for any
4 .\" purpose with or without fee is hereby granted, provided that the above
5 .\" copyright notice and this permission notice appear in all copies.
6 .\"
7 .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
8 .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
9 .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
10 .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
11 .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
12 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
13 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
14 .Dd April 11, 2022
15 .Dt FTSEARCH 1
16 .Os
17 .Sh NAME
18 .Nm ftsearch
19 .Nd search strings quickly
20 .Sh SYNOPSIS
21 .Nm
22 .Bk -words
23 .Op Fl d Ar dbpath
24 .Op Fl l
25 .Op Fl s
26 .Op Ar query
27 .Ek
28 .Sh DESCRIPTION
29 The
30 .Nm
31 utility searches a database for all documents which match the given
32 .Ar query .
33 The database needs to be created beforehand with
34 .Xr mkftsidx 1 .
35 .Pp
36 The arguments are as follows
37 .Bl -tag -width 9m
38 .It Fl d Ar dbpath
39 Path to the database.
40 .Pa db
41 by default.
42 .It Fl l
43 List all known documents.
44 Conflicts with
45 .Fl s
46 and
47 .Ar query .
48 .It Fl s
49 Print database stats.
50 Conflicts with
51 .Fl l
52 and
53 .Ar query .
54 .It Ar query
55 The query to search for.
56 .El
57 .Sh EXAMPLES
58 Search document that match
59 .Dq file manager
60 .Bd -literal -offset indent
61 $ ftsearch 'file manager'
62 .Ed
63 .Sh SEE ALSO
64 .Xr mkftsidx 1
65 .Sh AUTHORS
66 .An -nosplit
67 The
68 .Nm
69 program was written by
70 .An Omar Polo Aq Mt op@omarpolo.com .