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 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 p|w
25 .Op Ar path
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 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 otherwise creates a database from a Wikipedia dump.
46 .It Ar path
47 Path to the sources.
48 When working in
49 .Ar p
50 mode, it's the optional path to the sqlports database.
51 Otherwise, it's the mandatory path to the Wikipedia file dump.
52 .El
53 .Sh EXAMPLES
54 To create a database with the
55 .Ox
56 ports tree content:
57 .Bd -literal -offset indent
58 $ mkftsidx
59 .Ed
60 .Pp
61 To create a database from a Wikipedia dump to the
62 .Pa db.wiki
63 file:
64 .Bd -literal -offset indent
65 $ mkftsidx -o db.wiki -mw enwiki-latest-abstract1.xml
66 .Ed
67 .Sh SEE ALSO
68 .Xr ftsearch 1
69 .Sh AUTHORS
70 .An -nosplit
71 The
72 .Nm
73 program was written by
74 .An Omar Polo Aq Mt op@omarpolo.com .