Blob


1 .\" Copyright (c) 2022 Omar Polo <op@omarpolo.com>
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 MKFTSIDX 1
16 .Os
17 .Sh NAME
18 .Nm mkftsidx
19 .Nd construct fts database
20 .Sh SYNOPSIS
21 .Nm
22 .Bk -words
23 .Op Fl o Ar dbpath
24 .Op Fl m Ar f|p|w
25 .Op Ar
26 .Ek
27 .Sh DESCRIPTION
28 .Nm
29 is a program to create a fts database for
30 .Xr ftsearch 1 .
31 The arguments are as follows:
32 .Bl -tag -width Ds
33 .It Fl o Ar dbpath
34 Path to the database file to create.
35 .Pa db
36 by default.
37 .It Fl m Ar f|p|w
38 Set the mode.
39 If
40 .Ar p
41 .Pq the default
42 then create a database with the
43 .Ox
44 ports tree data,
45 If
46 .Ar f
47 index plain-text files;
48 otherwise creates a database from a Wikipedia dump.
49 .It Ar
50 Path to the sources.
51 When workin in
52 .Ar f
53 mode, it's the list of files to index
54 .Pq if empty reads from stdin one path per line .
55 When working in
56 .Ar p
57 mode, it's the optional path to the sqlports database.
58 Otherwise, it's the mandatory path to the Wikipedia file dump.
59 .El
60 .Sh EXAMPLES
61 To create a database with the
62 .Ox
63 ports tree content:
64 .Bd -literal -offset indent
65 $ mkftsidx
66 .Ed
67 .Pp
68 To create a database from a Wikipedia dump to the
69 .Pa db.wiki
70 file:
71 .Bd -literal -offset indent
72 $ mkftsidx -o db.wiki -mw enwiki-latest-abstract1.xml
73 .Ed
74 .Sh SEE ALSO
75 .Xr ftsearch 1
76 .Sh AUTHORS
77 .An -nosplit
78 The
79 .Nm
80 program was written by
81 .An Omar Polo Aq Mt op@omarpolo.com .