~ubuntu-branches/ubuntu/trusty/hyperestraier/trusty-proposed

« back to all changes in this revision

Viewing changes to debian/estcmd.1

  • Committer: Bazaar Package Importer
  • Author(s): Steve Langasek
  • Date: 2006-11-14 05:28:32 UTC
  • mfrom: (2.1.4 feisty)
  • Revision ID: james.westby@ubuntu.com-20061114052832-0lzqzcefn8mt4yqe
Tags: 1.4.9-1.1
* Non-maintainer upload.
* High-urgency upload for RC bugfix.
* Set HOME=$(CURDIR)/junkhome when building, otherwise the package build
  will incorrectly look for headers there -- and fail when the directory
  exists and is unreadable, as happens sometimes on sudo-using
  autobuilders!

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
.\"                                      Hey, EMACS: -*- nroff -*-
2
 
.\" First parameter, NAME, should be all caps
3
 
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
4
 
.\" other parameters are allowed: see man(7), man(1)
5
 
.TH ESTCMD 1 "2005-06-04" "Man Page" "HyperEstraier"
6
 
.\" Please adjust this date whenever revising the manpage.
7
 
.\"
8
 
.\" Some roff macros, for reference:
9
 
.\" .nh        disable hyphenation
10
 
.\" .hy        enable hyphenation
11
 
.\" .ad l      left justify
12
 
.\" .ad b      justify to both left and right margins
13
 
.\" .nf        disable filling
14
 
.\" .fi        enable filling
15
 
.\" .br        insert line break
16
 
.\" .sp <n>    insert n+1 empty lines
17
 
.\" for manpage-specific macros, see man(7)
18
 
.SH NAME
19
 
estcmd \- indexing and searching
20
 
.SH SYNOPSIS
21
 
.B estcmd put 
22
 
.RI "[-cl] " db " [" file ]
23
 
.br
24
 
.B estcmd out 
25
 
.RI "[-cl] " db " " expr
26
 
.br
27
 
.B estcmd edit
28
 
.RI "[-cl] " db " " expr " " name " [" value "]"
29
 
.br
30
 
.B estcmd get 
31
 
.I db expr
32
 
.br
33
 
.B estcmd list 
34
 
.I db
35
 
.br
36
 
.B estcmd uriid 
37
 
.I db uri
38
 
.br
39
 
.B estcmd meta 
40
 
.RI "" db " [" name " [" value ]]
41
 
.br
42
 
.B estcmd inform 
43
 
.I db
44
 
.br
45
 
.B estcmd optimize 
46
 
.RI "[-onp] [-ond] " db
47
 
.br
48
 
.B estcmd search 
49
 
.RI "[-ic " enc "] [-vu|-va|-vf|-vs|-vh|-vx|-dd] [-kn " num "] [-gs|-gf|-ga] [-cd] [-ni] [-sf] [-hs] [-attr " expr "] [-ord " expr "] [-max " num "] [-sim " id "] " db " [" phrase ]
50
 
.br
51
 
.B estcmd gather 
52
 
.RI "[-cl] [-fe|-ft|-fh|-fm] [-fx " sufs " " cmd "] [-fz] [-fo] [-rm " sufs "] [-ic " enc "] [-il " lang "] [-bc] [-pc " enc "] [-px " name "] [-apn] [-sd] [-cm] [-cs " num "] " db " [" file|dir ]
53
 
.br
54
 
.B estcmd purge 
55
 
.RI "[-cl] [-fc] " db " [" prefix ]
56
 
.br
57
 
.B estcmd extkeys 
58
 
.RI "[-fc] [-dfdb " file "] [-ni] [-kn " num "] " db " [" prefix ]
59
 
.br
60
 
.B estcmd words
61
 
.RI "[-dfdb " file "] " db
62
 
.br
63
 
.B estcmd draft 
64
 
.RI "[-ft|-fh|-fm] [-ic " enc "] [-il " lang "] [" file ]
65
 
.br
66
 
.B estcmd break 
67
 
.RI "[-ic " enc "] [-il " lang "] [-apn] [-wt] [" file ]
68
 
.br
69
 
.B estcmd crypt 
70
 
.RI "" key [ hash ]
71
 
.br
72
 
.B estcmd randput 
73
 
.RI "[-ren|-rla|-reu|-ror|-rjp|-rch] [-cs " num "] " db " " dnum
74
 
.br
75
 
.B estcmd wicked 
76
 
.I db dnum
77
 
.br
78
 
.B estcmd regression 
79
 
.I db
80
 
.br
81
 
.B estcmd version
82
 
.SH DESCRIPTION
83
 
This manual page documents briefly the
84
 
.B estcmd
85
 
commands.
86
 
.PP
87
 
.\" TeX users may be more comfortable with the \fB<whatever>\fP and
88
 
.\" \fI<whatever>\fP escape sequences to invode bold face and italics, 
89
 
.\" respectively.
90
 
\fBestcmd\fP is a program that can do not only indexing
91
 
but also search.
92
 
.SH SUBCOMMANDS AND OPTIONS
93
 
\fBestcmd\fP is an aggregation of sub commands. The name of a sub command is
94
 
specified by the first argument. Other arguments are parsed according to each
95
 
sub command. The argument \fIdb\fP specifies the path of an index.
96
 
.PP
97
 
All sub commands return 0 if the operation is success, else return 0. As for
98
 
put, out, gather, purge, randput, wicked, and regression, they finish with
99
 
closing the database when they catch the signal 1, 2, 3, 13, or 15.
100
 
.PP
101
 
The encoding name specified by \fB-ic\fP option should be such name registered to
102
 
IETF as UTF-8, ISO-8859-1, and so on. The language name specified by -il option
103
 
should be one of "en" (English), "ja" (Japanese, "zh" (Chinese), "ko" (Korean).
104
 
.PP
105
 
An outer command specified by \fB-fx\fP option of gather receives the
106
 
path of the target document by the first argument and the path for
107
 
output by the second argument.
108
 
.PP
109
 
A summary of options is included below.
110
 
For a complete description, see /usr/share/doc/hyperestraier/uguide-en.html.
111
 
.PP
112
 
.B estcmd put 
113
 
.RI "[-cl] " db " [" file ]
114
 
.br
115
 
Register a document of document draft to an index.  
116
 
.RS
117
 
.PP
118
 
\fIfile\fP specifies a target file. If it is omitted, the standard
119
 
input is read.  
120
 
.PP
121
 
If \fB\-cl\fP is specifed, regions of a overwritten document are cleaned up.
122
 
.RE
123
 
.PP
124
 
 
125
 
.B estcmd out
126
 
.RI "[-cl] " db " " expr
127
 
.br
128
 
Remove information of a document from an index.
129
 
.RS
130
 
.PP
131
 
\fIexpr\fP specifies the ID number or the URI of a document.
132
 
.PP
133
 
If \fB\-cl\fP is specifed, regions of the document are cleaned up.
134
 
.RE
135
 
.PP
136
 
 
137
 
.B estcmd edit
138
 
.RI "[-cl] " db " " expr " " name " [" value "]"
139
 
.br
140
 
Edit an attribute of a document in an index.
141
 
.RS
142
 
.PP
143
 
\fIexpr\fP specifies the ID number or the URI of a document.
144
 
.PP
145
 
\fIname\fP specifies the name of an attribute.
146
 
.PP
147
 
\fIvalue\fP specifies the value of the attribute. If it is omitted, the attribute is removed.
148
 
.RE
149
 
.PP
150
 
 
151
 
.B estcmd get 
152
 
.I db expr
153
 
.br
154
 
Output document draft of a document in an index.
155
 
.RS
156
 
.PP
157
 
\fIexpr\fP specifies the ID number or the URI of a document.
158
 
.RE
159
 
.PP
160
 
 
161
 
.B estcmd list 
162
 
.I db
163
 
.br
164
 
Output a list of all document in an index.
165
 
.PP
166
 
 
167
 
.B estcmd uriid 
168
 
.I db uri
169
 
.br
170
 
Output the ID number of a document specified by URI.
171
 
.RS
172
 
.PP
173
 
\fIuri\fP specifies the URI of a document.
174
 
.RE
175
 
.PP
176
 
 
177
 
.B estcmd meta 
178
 
.RI "" db " [" name " [" value ]]
179
 
.br
180
 
Handle meta data.
181
 
.RS
182
 
.PP
183
 
\fIname\fP specifies the name of a piece of meta data. If it is omitted, a list
184
 
of all names is output.
185
 
.PP
186
 
\fIvalue\fP specifies the value of the meta data to be recorded. If it is
187
 
omitted, the current value is output. If it is an empty string, the meta
188
 
data is removed.
189
 
.RE
190
 
.PP
191
 
 
192
 
.B estcmd inform 
193
 
.I db
194
 
.br
195
 
 Output the number of documents and the number of unique words in an index.
196
 
.PP
197
 
 
198
 
.B estcmd optimize 
199
 
.RI "[-onp] [-ond] " db
200
 
.br
201
 
Optimize an index and clean up dispensable regions.
202
 
.RS
203
 
.PP
204
 
If \fB-onp\fP is specified, it is omitted to clean up dispensable regions.
205
 
.PP
206
 
If \fB-ond\fP is specified, it is omitted to optimize the database files.
207
 
.RE
208
 
.PP
209
 
 
210
 
.B estcmd search 
211
 
.RI "[-ic " enc "] [-vu|-va|-vf|-vs|-vh|-vx|-dd] [-kn " num "] [-gs|-gf|-ga] [-cd] [-ni] [-sf] [-hs] [-attr " expr "] [-ord " expr "] [-max " num "] [-sim " id "] " db " [" phrase ]
212
 
.br
213
 
 Search an index for documents.
214
 
.RS
215
 
.PP
216
 
\fIphrase\fP specifies the search phrase.
217
 
.PP
218
 
\fB-ic\fP specifies the input encoding. By default, it is UTF-8.
219
 
.PP
220
 
If \fB-vu\fP is specified, TSV of ID number and URI are output.
221
 
.PP
222
 
If \fB-va\fP is specified, multipart format including attributes is output.
223
 
.PP
224
 
If \fB-vf\fP is specified, multipart format including document draft is output.
225
 
.PP
226
 
If \fB-vs\fP is specified, multipart format including attributes and
227
 
snippets is output.
228
 
.PP
229
 
If \fB-vh\fP is specified, human readable format including attributes and
230
 
snippets is output.
231
 
.PP
232
 
If \fB-vx\fP is specified, XML including including attributes and snippets is
233
 
output.
234
 
.PP
235
 
If \fB-dd\fP is specified, document draft data are dumped and saved into
236
 
separated files.
237
 
.PP
238
 
\fB-kn\fP specifies the number of keywords to be extracted. By default, no
239
 
keyword is extracted.
240
 
.PP
241
 
If \fB-gs\fP is specified, every key of N-gram is checked. By default, it is
242
 
alternately.
243
 
.PP
244
 
If \fB-gf\fP is specified, keys of N-gram are checked every three.
245
 
.PP
246
 
If \fB-ga\fP is specified, keys of N-gram are checked every four.
247
 
.PP
248
 
If \fB-cd\fP is specified, whether documents match the search phrase 
249
 
definitely is checked.
250
 
.PP
251
 
If \fB-ni\fP is specified, TF-IDF tuning is omitted.
252
 
.PP
253
 
If \fB-sf\fP is specified, the phrase is treated as a simplefied form.
254
 
.PP
255
 
If \fB-hs\fP is specified, score information is output as a hint.
256
 
.PP
257
 
\fB-attr\fP specifies an attribute search condition. This option can
258
 
be specified multiple times.
259
 
.PP
260
 
\fB-ord\fP specifies the order expression. By default, it is
261
 
descending by score.
262
 
.PP
263
 
\fB-max\fP specifies the maximum number of show documents. Negative
264
 
means unlimited. By default, it is 10.
265
 
.PP
266
 
\fB-sim\fP specifies the ID number of the seed document for similarity search.
267
 
.RE
268
 
.PP
269
 
 
270
 
.B estcmd gather 
271
 
.RI "[-cl] [-fe|-ft|-fh|-fm] [-fx " sufs " " cmd "] [-fz] [-fo] [-rm " sufs "] [-ic " enc "] [-il " lang "] [-bc] [-pc " enc "] [-px " name "] [-apn] [-sd] [-cm] [-cs " num "] " db " [" file|dir ]
272
 
.br
273
 
Scan the local file system and register documents into an index.
274
 
.RS
275
 
If the third argument is the name of a file, a list of paths of target
276
 
documents are read from it. If it is "-", the standard input is specified.
277
 
If the third argument is the name of a directory. All files under the
278
 
directory are treated as target documents.
279
 
.PP
280
 
If \fB-cl\fP is specified, regions of overwritten documents are cleaned up.
281
 
.PP
282
 
If \fB-fe\fP is specified, target files are treated as document draft. By
283
 
default, the format is detected by the suffix of each document.
284
 
.PP
285
 
If \fB-ft\fP is specified, target files are treated as plain text.
286
 
.PP
287
 
If \fB-fh\fP is specified, target files are treated as HTML.
288
 
.PP
289
 
If \fB-fm\fP is specified, target files are treated as MIME.
290
 
.PP
291
 
If \fB-fx\fP is specified, target files with the specified suffixes
292
 
are processed by the specified outer command. If the command is leaded
293
 
by "T@", the output of the command is treated as plain text. If the
294
 
command is leaded by "H@", the output of the command is treated as
295
 
HTML. If the command is leaded by "M@", the output of the command is
296
 
treated as MIME. Else, the output is treated as document draft. This
297
 
option can be specified multiple times.
298
 
.PP
299
 
If \fB-fz\fP is specified, documents which do not corresponding to the
300
 
condition of \fB-fx\fP are ignored.
301
 
.PP
302
 
If \fB-fo\fP is specified, target files are not read. It is useful for 
303
 
efficient process of the outer command.
304
 
.PP
305
 
If \fB-rm\fP is specified, target files with the specified suffixes are 
306
 
removed. "*" matches any file. This option can be specified multiple times.
307
 
.PP
308
 
\fB-ic\fP specifies the input encoding. By default, it is detected
309
 
automatically.
310
 
.PP
311
 
\fB-il\fP specifies the preferred input language. By default, English
312
 
is preferred.
313
 
.PP
314
 
If \fB-bc\fP is specified, binary files are detected and ignored.
315
 
.PP
316
 
\fB-pc\fP specifies the encoding of file paths. By default, it is ISO-8859-1.
317
 
.PP
318
 
\fB-px\fP specifies the name of an attribute read from the list of paths. 
319
 
As the list of paths can be in TSV format, the first field is treated as 
320
 
the path of a target document, the second field and the followers are 
321
 
definitions of attribute values. \fB-px\fP specifies the name of each 
322
 
values of the second field and the followers. This option can be specified 
323
 
multiple times.
324
 
.PP
325
 
If \fB-apn\fP is specified, N-gram analysis is performed against
326
 
Europian text also.
327
 
.PP
328
 
If \fB-sd\fP is specified, the creation date and the modification date
329
 
of each file is recorded as attributes.
330
 
.PP
331
 
If \fB-cm\fP is specified, documents whose modification date has never
332
 
changed are ignored.
333
 
.PP
334
 
\fB-cs\fP specifies the size of cache memory by mega bytes. By
335
 
default, it is 64Mb.
336
 
.RE
337
 
.PP
338
 
 
339
 
.B estcmd purge 
340
 
.RI "[-cl] [-fc] " db " [" prefix ]
341
 
.br
342
 
 Purge information of documents which do not exist on the file system.
343
 
.RS
344
 
If \fIprefix\fP is specified, only documents whose URIs are begins with it.
345
 
.PP
346
 
If \fB-cl\fP is specified, regions of the deleted documents are cleaned up.
347
 
.PP
348
 
If \fB-fc\fP is specified, information of all target documents are deleted.
349
 
.RE
350
 
.PP
351
 
 
352
 
.B estcmd extkeys 
353
 
.RI "[-fc] [-dfdb " file "] [-ni] [-kn " num "] " db " [" prefix ]
354
 
.br
355
 
Create a database of keywords extracted from documents.
356
 
.RS
357
 
If \fIprefix\fP is specified, only documents whose URIs are begins
358
 
with it.
359
 
.PP
360
 
If \fB-fc\fP is specified, all target documents are processed
361
 
whichever they have existing records or not.
362
 
.PP
363
 
\fB-dfdb\fP specifies an outher database of document frequency. By default,
364
 
document frequency is calculated dynamically according to the index.
365
 
.PP
366
 
If \fB-ni\fP is specified, TF-IDF tuning is omitted.
367
 
.PP
368
 
\fB-kn\fP specifies the number of keywords to be extracted.
369
 
.RE
370
 
.PP
371
 
 
372
 
.B estcmd words
373
 
.RI "[-dfdb " file "] " db
374
 
.br
375
 
Output a list of all unique words and each record size which is treated as
376
 
docuemnt frequency
377
 
.RS
378
 
\fB-dfdb\fP specifies an outer database where the result is stored. By default,
379
 
the result is output to the standard output as TSV. If the outer database
380
 
already exists, the value of each record is incremented.
381
 
.RE
382
 
.PP
383
 
 
384
 
.B estcmd draft 
385
 
.RI "[-ft|-fh|-fm] [-ic " enc "] [-il " lang "] [" file ]
386
 
.br
387
 
Convert the file into document draft. 
388
 
.RS
389
 
If file argument is omitted, stdin is used.
390
 
.PP
391
 
If \fB-fh\fP is specified, target files are treated as HTML.
392
 
.PP
393
 
If \fB-fm\fP is specified, target files are treated as MIME.
394
 
.PP
395
 
\fB-ic\fP specifies the input encoding. By default, it is detected
396
 
automatically.
397
 
.PP
398
 
\fB-il\fP specifies the preferred input language. By default, English
399
 
is preferred.
400
 
.RE
401
 
.PP
402
 
 
403
 
.B estcmd break 
404
 
.RI "[-ic " enc "] [-il " lang "] [-apn] [-wt] [" file ]
405
 
.br
406
 
break down each words from plain text.
407
 
.RS
408
 
If file argument is omitted, stdin is used.  If file string starts with
409
 
'@', string following '@' itself is target.
410
 
.PP
411
 
\fB-ic\fP specifies the input encoding. By default, it is detected
412
 
automatically.
413
 
.PP
414
 
\fB-il\fP specifies the preferred input language. By default, English
415
 
is preferred.
416
 
.PP
417
 
If \fB-apn\fP is specified, N-gram analysis is performed against
418
 
Europian text also.
419
 
.PP
420
 
If \fB-wt\fP is specified, output tailing 1-gram.
421
 
.RE
422
 
.PP
423
 
 
424
 
.B estcmd crypt 
425
 
.RI "" key [ hash ]
426
 
.br
427
 
For test and debug.
428
 
.PP
429
 
 
430
 
.B estcmd randput 
431
 
.RI "[-ren|-rla|-reu|-ror|-rjp|-rch] [-cs " num "] " db " " dnum
432
 
.br
433
 
For test and debug.
434
 
.PP
435
 
 
436
 
.B estcmd wicked 
437
 
.I db dnum
438
 
.br
439
 
 For test and debug.
440
 
.PP
441
 
 
442
 
.B estcmd regression 
443
 
.I db
444
 
.br
445
 
For test and debug.
446
 
.PP
447
 
 
448
 
.B estcmd version
449
 
.br
450
 
Show the version information.
451
 
.SH EXAMPLES
452
 
.PP
453
 
The following is to register mail files of mh format.
454
 
.PP
455
 
\fB     find /home/mikio/Mail -type f | egrep 'inbox/(business|friends)/[0-9]+$' | estcmd gather -cl -fm -cm casket -\fP
456
 
.PP
457
 
The following is to register MS-Office files. estfxmsotohtml requires wvWare
458
 
and xlhtml.
459
 
.PP
460
 
\fB     PATH=$PATH:/usr/local/share/hyperestraier/filter ; export PATH\fP
461
 
.br
462
 
\fB     estcmd gather -cl -fx ".doc,.xls,.ppt" "H@estfxmsotohtml" -fz -sd -cm casket .\fP
463
 
.PP
464
 
The following is to register PDF files. estfxpdftohtml requires pdftotext.
465
 
.PP
466
 
\fB     PATH=$PATH:/usr/local/share/hyperestraier/filter ; export PATH\fP
467
 
.br
468
 
\fB     estcmd gather -cl -fx ".pdf" "H@estfxpdftohtml" -fz -sd -cm casket .\fP
469
 
.PP
470
 
The following is to output the search result as XML.
471
 
.PP
472
 
\fB     estcmd search -vx -max 8 casket 'socket AND shutdown'\fP
473
 
.PP
474
 
.SH SEE ALSO
475
 
.BR estload (1),
476
 
.BR estmaster (1),
477
 
.BR estwolefind (1),
478
 
.BR estconfig (1).
479
 
.SH AUTHOR
480
 
estraier was written by Mikio Hirabayashi <mikio at users.sourceforge.net>.
481
 
.PP
482
 
This manual page was written by Fumitoshi UKAI <ukai@debian.or.jp>,
483
 
for the Debian project (but may be used by others).