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

« back to all changes in this revision

Viewing changes to man/estraier.3

  • 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:
49
49
.B void est_doc_add_hidden_text(ESTDOC *doc, const char *text);
50
50
`doc' specifies a document object.  `text' specifies a hidden sentence.
51
51
.PP
 
52
The function `est_doc_set_keywords' is used in order to attach keywords to a document object.
 
53
.TP
 
54
.B void est_doc_set_keywords(ESTDOC *doc, CBMAP *kwords);
 
55
`doc' specifies a document object.  `kwords' specifies a map object of keywords.  Keys of the map should be keywords of the document and values should be their scores in decimal string.  The map object is copied internally.
 
56
.PP
 
57
The function `est_doc_set_score' is used in order to set the substitute score of a document object.
 
58
.TP
 
59
.B void est_doc_set_score(ESTDOC *doc, int score);
 
60
`doc' specifies a document object.  `score' specifies the substitute score.  It it is negative, the substitute score setting is nullified.
 
61
.PP
52
62
The function `est_doc_id' is used in order to get the ID number of a document object.
53
63
.TP
54
64
.B int est_doc_id(ESTDOC *doc);
74
84
.B char *est_doc_cat_texts(ESTDOC *doc);
75
85
`doc' specifies a document object.  The return value is concatenated sentences of the document object.  Because the region of the return value is allocated with the `malloc' call, it should be released with the `free' call if it is no longer in use.
76
86
.PP
 
87
The function `est_doc_keywords' is used in order to get attached keywords of a document object.
 
88
.TP
 
89
.B CBMAP *est_doc_keywords(ESTDOC *doc);
 
90
`doc' specifies a document object.  The return value is a map object of keywords and their scores in decimal string.  If no keyword is attached, `NULL' is returned.  The life duration of the returned object is synchronous with the one of the document object.
 
91
.PP
77
92
The function `est_doc_dump_draft' is used in order to dump draft data of a document object.
78
93
.TP
79
94
.B char *est_doc_dump_draft(ESTDOC *doc);
122
137
.B void est_cond_set_max(ESTCOND *cond, int max);
123
138
`cond' specifies a condition object.  `max' specifies the maximum number of retrieval.  By default, the number of retrieval is not limited.
124
139
.PP
 
140
The function `est_cond_set_skip' is used in order to set the number of skipped documents of a condition object.
 
141
.TP
 
142
.B void est_cond_set_skip(ESTCOND *cond, int skip);
 
143
`cond' specifies a condition object.  `skip' specifies the number of documents to be skipped in the search result.
 
144
.PP
125
145
The function `est_cond_set_options' is used in order to set options of retrieval of a condition object.
126
146
.TP
127
147
.B void est_cond_set_options(ESTCOND *cond, int options);
128
 
`cond' specifies a condition object.  `options' specifies options: `ESTCONDSURE' specifies that it checks every N\-gram key, `ESTCONDUSUAL', which is the default, specifies that it checks N\-gram keys with skipping one key, `ESTCONDFAST' skips two keys, `ESTCONDAGITO' skips three keys, `ESTCONDNOIDF' specifies not to perform TF\-IDF tuning, `ESTCONDSIMPLE' specifies to use simplified phrase, `ESTCONDETCH' specifies to attach the keyword vector (only for the node API), `ESTCONDSCFB' specifies to feed back scores (only for debugging).  Each option can be specified at the same time by bitwise or.  If keys are skipped, though search speed is improved, the relevance ratio grows less.
 
148
`cond' specifies a condition object.  `options' specifies options: `ESTCONDSURE' specifies that it checks every N\-gram key, `ESTCONDUSUAL', which is the default, specifies that it checks N\-gram keys with skipping one key, `ESTCONDFAST' skips two keys, `ESTCONDAGITO' skips three keys, `ESTCONDNOIDF' specifies not to perform TF\-IDF tuning, `ESTCONDSIMPLE' specifies to use simplified phrase, `ESTCONDROUGH' specifies to use rustic phrase, `ESTCONDUNION' specifies to use union phrase, `ESTCONDISECT' specifies to use intersection phrase, `ESTCONDSCFB' specifies to feed back scores (only for debugging).  Each option can be specified at the same time by bitwise or.  If keys are skipped, though search speed is improved, the relevance ratio grows less.
 
149
.PP
 
150
The function `est_cond_set_auxiliary' is used in order to set permission to adopt result of the auxiliary index.
 
151
.TP
 
152
.B void est_cond_set_auxiliary(ESTCOND *cond, int min);
 
153
`cond' specifies a condition object.  `min' specifies the minimum hits to adopt result of the auxiliary index.  If it is not more than 0, the auxiliary index is not used.  By default, it is 32.
129
154
.PP
130
155
The function `est_cond_set_eclipse' is used in order to set the lower limit of similarity eclipse.
131
156
.TP
132
157
.B void est_cond_set_eclipse(ESTCOND *cond, double limit);
133
 
`cond' specifies a condition object.  `limit' specifies the lower limit of similarity for documents to be eclipsed.  Similarity is between 0.0 and 1.0.
 
158
`cond' specifies a condition object.  `limit' specifies the lower limit of similarity for documents to be eclipsed.  Similarity is between 0.0 and 1.0.  If the limit is added by `ESTECLSIMURL', similarity is weighted by URL.  If the limit is `ESTECLSERV', similarity is ignored and documents in the same server are eclipsed.  If the limit is `ESTECLDIR', similarity is ignored and documents in the same directory are eclipsed.  If the limit is `ESTECLFILE', similarity is ignored and documents of the same file are eclipsed.
 
159
.PP
 
160
The function `est_cond_set_distinct' is used in order to set the attribute distinction filter.
 
161
.TP
 
162
.B void est_cond_set_distinct(ESTCOND *cond, const char *name);
 
163
`cond' specifies a condition object.  `name' specifies the name of an attribute to be distinct.  If this filter is set, candidates which have same value of the attribute is omitted.
 
164
.PP
 
165
The function `est_set_cond_mask' is used in order to set the mask of targets of meta search.
 
166
.TP
 
167
.B void est_cond_set_mask(ESTCOND *cond, int mask);
 
168
`cond' specifies a condition object.  `mask' specifies a masking number.  1 means the first target, 2 means the second target, 4 means the third target, and power values of 2 and their summation compose the mask.
134
169
 
135
170
.SH API FOR DATABASE
136
171
.PP
150
185
The function `est_db_open' is used in order to open a database.
151
186
.TP
152
187
.B ESTDB *est_db_open(const char *name, int omode, int *ecp);
153
 
`name' specifies the name of a database directory.  `omode' specifies open modes: `ESTDBWRITER' as a writer, `ESTDBREADER' as a reader.  If the mode is `ESTDBWRITER', the following may be added by bitwise or: `ESTDBCREAT', which means it creates a new database if not exist, `ESTDBTRUNC', which means it creates a new database regardless if one exists.  Both of `ESTDBREADER' and  `ESTDBWRITER' can be added to by bitwise or: `ESTDBNOLCK', which means it opens a database file without file locking, or `ESTDBLCKNB', which means locking is performed without blocking.  If `ESTDBNOLCK' is used, the application is responsible for exclusion control.  `ESTDBCREAT' can be added to by bitwise or: `ESTDBPERFNG', which means N\-gram analysis is performed against European text also.  `ecp' specifies the pointer to a variable to which the error code is assigned.  The return value is a database object of the database or `NULL' if failure.
 
188
`name' specifies the name of a database directory.  `omode' specifies open modes: `ESTDBWRITER' as a writer, `ESTDBREADER' as a reader.  If the mode is `ESTDBWRITER', the following may be added by bitwise or: `ESTDBCREAT', which means it creates a new database if not exist, `ESTDBTRUNC', which means it creates a new database regardless if one exists.  Both of `ESTDBREADER' and  `ESTDBWRITER' can be added to by bitwise or: `ESTDBNOLCK', which means it opens a database file without file locking, or `ESTDBLCKNB', which means locking is performed without blocking.  If `ESTDBNOLCK' is used, the application is responsible for exclusion control.  `ESTDBCREAT' can be added to by bitwise or: `ESTDBPERFNG', which means N\-gram analysis is performed against European text also, `ESTDBSMALL', which means the index is tuned to register less than 50000 documents, `ESTDBLARGE', which means the index is tuned to register more than 300000 documents, `ESTDBHUGE', which means the index is tuned to register more than 1000000 documents, `ESTDBHUGE2', which means the index is tuned to register more than 5000000 documents, `ESTDBHUGE3', which means the index is tuned to register more than 10000000 documents, `ESTDBSCVOID', which means scores are stored as void, `ESTDBSCINT', which means scores are stored as 32-bit integer, `ESTDBSCASIS', which means scores are stored as-is and marked not to be tuned when search.  `ecp' specifies the pointer to a variable to which the error code is assigned.  The return value is a database object of the database or `NULL' if failure.
154
189
.PP
155
190
The function `est_db_close' is used in order to close a database.
156
191
.TP
167
202
.B int est_db_fatal(ESTDB *db);
168
203
`db' specifies a database object.  The return value is true if the database has fatal error, else it is false.
169
204
.PP
 
205
The function `est_db_add_attr_index' is used in order to add an index for narrowing or sorting with document attributes.
 
206
.TP
 
207
.B int est_db_add_attr_index(ESTDB *db, const char *name, int type);
 
208
`db' specifies a database object connected as a writer.  `name' specifies the name of an attribute.  `type' specifies the data type of attribute index; `ESTIDXATTRSEQ' for multipurpose sequencial access method, `ESTIDXATTRSTR' for narrowing with attributes as strings, `ESTIDXATTRNUM' for narrowing with attributes as numbers.  The return value is true if success, else it is false.  Note that this function should be called before the first document is registered.
 
209
.PP
170
210
The function `est_db_flush' is used in order to flush index words in the cache of a database.
171
211
.TP
172
212
.B int est_db_flush(ESTDB *db, int max);
180
220
The function `est_db_optimize' is used in order to optimize a database.
181
221
.TP
182
222
.B int est_db_optimize(ESTDB *db, int options);
183
 
`db' specifies a database object connected as a writer.  `options' specifies options: `ESTOPTNOPURGE' to omit purging dispensable region of deleted documents, `ESTOPTNODBOPT' to omit optimization of the database files.  The two can be specified at the same time by bitwise or.  The return value is true if success, else it is false.
 
223
`db' specifies a database object connected as a writer.  `options' specifies options: `ESTOPTNOPURGE' to omit purging dispensable region of deleted documents, `ESTOPTNODBOPT' to omit optimization of the database files.  The three can be specified at the same time by bitwise or.  The return value is true if success, else it is false.
 
224
.PP
 
225
The function `est_db_merge' is used in order to merge another database.
 
226
.TP
 
227
.B int est_db_merge(ESTDB *db, const char *name, int options);
 
228
`db' specifies a database object connected as a writer.  `name' specifies the name of another database directory.  `options' specifies options: `ESTMGCLEAN' to clean up dispensable regions of the deleted document.  The return value is true if success, else it is false.  Creation options of the two databases should be same entirely.  ID numbers of imported documents are changed within the sequence of the desitination database.  If URIs of imported documents conflict ones of exsisting documents, existing documents are removed.
184
229
.PP
185
230
The function `est_db_put_doc' is used in order to add a document to a database.
186
231
.TP
187
232
.B int est_db_put_doc(ESTDB *db, ESTDOC *doc, int options);
188
 
`db' specifies a database object connected as a writer.  `doc' specifies a document object.  The document object should have the URI attribute.  `options' specifies options: `ESTPDCLEAN' to clean up dispensable regions of the overwritten document.  The return value is true if success, else it is false.  If the URI attribute is same with an existing document in the database, the existing one is deleted.
 
233
`db' specifies a database object connected as a writer.  `doc' specifies a document object.  The document object should have the URI attribute.  `options' specifies options: `ESTPDCLEAN' to clean up dispensable regions of the overwritten document, `ESTPDWEIGHT' to weight scores statically with score weighting attribute.  The return value is true if success, else it is false.  If the URI attribute is same with an existing document in the database, the existing one is deleted.
189
234
.PP
190
235
The function `est_db_out_doc' is used in order to remove a document from a database.
191
236
.TP
200
245
The function `est_db_get_doc' is used in order to retrieve a document in a database.
201
246
.TP
202
247
.B ESTDOC *est_db_get_doc(ESTDB *db, int id, int options);
203
 
`db' specifies a database object.  `id' specifies the ID number of a registered document.  `options' specifies options: `ESTGDNOATTR' to ignore attributes, `ESTGDNOTEXT' to ignore the body text.  The two can be specified at the same time by bitwise or.  The return value is a document object.  On error, `NULL' is returned.
 
248
`db' specifies a database object.  `id' specifies the ID number of a registered document.  `options' specifies options: `ESTGDNOATTR' to ignore attributes, `ESTGDNOTEXT' to ignore the body text, `ESTGDNOKWD' to ignore keywords.  The two can be specified at the same time by bitwise or.  The return value is a document object.  It should be deleted with `est_doc_delete' if it is no longer in use.  On error, `NULL' is returned.
204
249
.PP
205
250
The function `est_db_get_doc_attr' is used in order to retrieve the value of an attribute of a document in a database.
206
251
.TP
232
277
.B double est_db_size(ESTDB *db);
233
278
`db' specifies a database object.  The return value is the size of the database.
234
279
.PP
235
 
The function `est_db_search' is used in order to search documents corresponding a condition for a database.
 
280
The function `est_db_search' is used in order to search a database for documents corresponding a condition.
236
281
.TP
237
282
.B int *est_db_search(ESTDB *db, ESTCOND *cond, int *nump, CBMAP *hints);
238
283
`db' specifies a database object.  `cond' specifies a condition object.  `nump' specifies the pointer to a variable to which the number of elements in the result is assigned.  `hints' specifies a map object into which the number of documents corresponding to each word is stored.  If a word is in a negative condition, the number is negative.  The element whose key is an empty string specifies the number of whole result.  If it is `NULL', it is not used.  The return value is an array whose elements are ID numbers of corresponding documents.  This function does never fail.  Even if no document corresponds or an error occurs, an empty array is returned.  Because the region of the return value is allocated with the `malloc' call, it should be released with the `free' call if it is no longer in use.
239
284
.PP
 
285
Search plural databases for documents corresponding a condition.
 
286
.TP
 
287
.B int *est_db_search_meta(ESTDB **dbs, int dbnum, ESTCOND *cond, int *nump, CBMAP *hints);
 
288
`dbs' specifies an array whose elements are database objects.  `dbnum' specifies the number of elements of the array.  `cond' specifies a condition object.  `nump' specifies the pointer to a variable to which the number of elements in the result is assigned.  `hints' specifies a map object into which the number of documents corresponding to each word is stored.  If a word is in a negative condition, the number is negative.  The element whose key is an empty string specifies the number of whole result.  If it is `NULL', it is not used.  The return value is an array whose elements are indexes of container databases and ID numbers of in each database alternately.  This function does never fail.  Even if no document corresponds or an error occurs, an empty array is returned.  Because the region of the return value is allocated with the `malloc' call, it should be released with the `free' call if it is no longer in use.
 
289
.PP
240
290
The function `est_db_scan_doc' is used in order to check whether a document object matches the phrase of a search condition object definitely.
241
291
.TP
242
292
.B int est_db_scan_doc(ESTDB *db, ESTDOC *doc, ESTCOND *cond);
245
295
The function `est_db_set_cache_size' is used in order to set the maximum size of the cache memory of a database.
246
296
.TP
247
297
.B void est_db_set_cache_size(ESTDB *db, size_t size, int anum, int tnum, int rnum);
248
 
`db' specifies a database object.  `size' specifies the maximum size of the index cache.  By default, it is 64MB.  If it is not more than 0, the current size is not changed.  `anum' specifies the maximum number of cached records for document attributes.  By default, it is 8192.  If it is not more than 0, the current size is not changed.  `tnum' specifies the maximum number of cached records for document texts.  By default, it is 1024.  If it is not more than 0, the current size is not changed.  `rnum' specifies the maximum number of cached records for occurrence results.  By default, it is 256.  If it is not more than 0, the current size is not changed.
 
298
`db' specifies a database object.  `size' specifies the maximum size of the index cache.  By default, it is 64MB.  If it is negative, the current size is not changed.  `anum' specifies the maximum number of cached records for document attributes.  By default, it is 8192.  If it is negative, the current size is not changed.  `tnum' specifies the maximum number of cached records for document texts.  By default, it is 1024.  If it is negative, the current size is not changed.  `rnum' specifies the maximum number of cached records for occurrence results.  By default, it is 256.  If it is negative, the current size is not changed.
249
299
 
250
300
.SH PARALLELING
251
301
.PP
272
322
 
273
323
.SH SEE ALSO
274
324
.PP
 
325
.BR estconfig (1),
275
326
.BR estcmd (1),
276
 
.BR estconfig (1),
 
327
.BR estmaster (1),
 
328
.BR estcall (1),
 
329
.BR estwaver (1),
277
330
.BR cabin (3),
278
331
.BR estnode (3)
279
332
.PP