1ESTRAIER(3)                     Hyper Estraier                     ESTRAIER(3)
2
3
4

NAME

6       estraier.h - the core API of Hyper Estraier
7
8

SYNOPSIS

10       #include <estraier.h>
11       #include <cabin.h>
12       #include <stdlib.h>
13
14

API FOR DOCUMENT

16       The  API  for  documents aims to handle documents which were registered
17       into the index.
18
19       The type of the structure `ESTDOC' is for abstraction of a document.  A
20       document  is  composed  of some attributes and some text sentences.  No
21       entity of `ESTDOC' is accessed directly, but  it  is  accessed  by  the
22       pointer.   The term of document object means the pointer and its refer‐
23       ent.  A document object is created by the  function  `est_doc_new'  and
24       destroyed by `est_doc_delete'.  Every created document object should be
25       destroyed.
26
27       Target documents of search are to be registered in the database before‐
28       hand.   The  ID  is assigned to each registered document.  When search,
29       they can be retrieved from the database by their ID.  The  encoding  of
30       attributes and text sentences should be UTF-8.
31
32       The  function  `est_doc_new'  is  used  in  order  to create a document
33       object.
34
35       ESTDOC *est_doc_new(void);
36              The return value is an object of a document.
37
38       The function `est_doc_new_from_draft' is used in order to create a doc‐
39       ument object made from draft data.
40
41       ESTDOC *est_doc_new_from_draft(const char *draft);
42              `draft'  specifies  a string of draft data.  The return value is
43              an object of a document.
44
45       The function `est_doc_delete' is used in order to  destroy  a  document
46       object.
47
48       void est_doc_delete(ESTDOC *doc);
49              `doc' specifies a document object.
50
51       The function `est_doc_add_attr' is used in order to add an attribute to
52       a document object.
53
54       void  est_doc_add_attr(ESTDOC  *doc,  const  char  *name,  const   char
55       *value);
56              `doc' specifies a document object.  `name' specifies the name of
57              an attribute.  `value' specifies the value of the attribute.  If
58              it is `NULL', the attribute is removed.
59
60       The  function  `est_doc_add_text' is used in order to add a sentence of
61       text to a document object.
62
63       void est_doc_add_text(ESTDOC *doc, const char *text);
64              `doc' specifies a document object.  `text' specifies a  sentence
65              of text.
66
67       The function `est_doc_add_hidden_text' is used in order to add a hidden
68       sentence to a document object.
69
70       void est_doc_add_hidden_text(ESTDOC *doc, const char *text);
71              `doc' specifies a document object.  `text'  specifies  a  hidden
72              sentence.
73
74       The function `est_doc_set_keywords' is used in order to attach keywords
75       to a document object.
76
77       void est_doc_set_keywords(ESTDOC *doc, CBMAP *kwords);
78              `doc' specifies a document object.   `kwords'  specifies  a  map
79              object  of  keywords.  Keys of the map should be keywords of the
80              document and values should be their scores  in  decimal  string.
81              The map object is copied internally.
82
83       The function `est_doc_set_score' is used in order to set the substitute
84       score of a document object.
85
86       void est_doc_set_score(ESTDOC *doc, int score);
87              `doc' specifies a document object.  `score' specifies  the  sub‐
88              stitute  score.  It it is negative, the substitute score setting
89              is nullified.
90
91       The function `est_doc_id' is used in order to get the ID  number  of  a
92       document object.
93
94       int est_doc_id(ESTDOC *doc);
95              `doc'  specifies  a document object.  The return value is the ID
96              number of the document object.  If the object has not been  reg‐
97              istered, -1 is returned.
98
99       The  function  `est_doc_attr_names'  is  used in order to get a list of
100       attribute names of a document object.
101
102       CBLIST *est_doc_attr_names(ESTDOC *doc);
103              `doc' specifies a document object.  The return value  is  a  new
104              list  object of attribute names of the document object.  Because
105              the object of the return  value  is  opened  with  the  function
106              `cblistopen',  it  should  be  closed with the function `cblist‐
107              close' if it is no longer in use.
108
109       The function `est_doc_attr' is used in order to get  the  value  of  an
110       attribute of a document object.
111
112       const char *est_doc_attr(ESTDOC *doc, const char *name);
113              `doc' specifies a document object.  `name' specifies the name of
114              an attribute.  The return value is the value of the attribute or
115              `NULL'  if it does not exist.  The life duration of the returned
116              string is synchronous with the one of the document object.
117
118       The function `est_doc_texts' is used in order to get  a  list  of  sen‐
119       tences of the text of a document object.
120
121       const CBLIST *est_doc_texts(ESTDOC *doc);
122              `doc'  specifies  a document object.  The return value is a list
123              object of sentences of the text of  the  document  object.   The
124              life duration of the returned object is synchronous with the one
125              of the document object.
126
127       The function `est_doc_cat_texts' is used in order to  concatenate  sen‐
128       tences of the text of a document object.
129
130       char *est_doc_cat_texts(ESTDOC *doc);
131              `doc' specifies a document object.  The return value is concate‐
132              nated sentences of the document object.  Because the  region  of
133              the  return value is allocated with the `malloc' call, it should
134              be released with the `free' call if it is no longer in use.
135
136       The function `est_doc_keywords' is used in order to get  attached  key‐
137       words of a document object.
138
139       CBMAP *est_doc_keywords(ESTDOC *doc);
140              `doc'  specifies  a  document object.  The return value is a map
141              object of keywords and their scores in decimal  string.   If  no
142              keyword  is  attached, `NULL' is returned.  The life duration of
143              the returned object is synchronous with the one of the  document
144              object.
145
146       The  function  `est_doc_dump_draft' is used in order to dump draft data
147       of a document object.
148
149       char *est_doc_dump_draft(ESTDOC *doc);
150              `doc' specifies a document object.  The return  value  is  draft
151              data  of  the document object.  Because the region of the return
152              value is allocated with the `malloc' call, it should be released
153              with the `free' call if it is no longer in use.
154
155       The  function `est_doc_make_snippet' is used in order to make a snippet
156       of the body text of a document object.
157
158       char  *est_doc_make_snippet(ESTDOC  *doc,  const  CBLIST  *words,   int
159       wwidth, int hwidth, int awidth);
160              `doc'  specifies  a  document  object.   `word' specifies a list
161              object of words to be highlight.  `wwidth' specifies whole width
162              of  the  result.   `hwidth' specifies width of strings picked up
163              from the beginning of the text.   `awidth'  specifies  width  of
164              strings  picked  up  around  each  highlighted word.  The return
165              value is a snippet string of  the  body  text  of  the  document
166              object.   There are tab separated values.  Each line is a string
167              to be shown.  Though most lines have only one field, some  lines
168              have two fields.  If the second field exists, the first field is
169              to be shown with highlighted, and the  second  field  means  its
170              normalized  form.   Because  the  region  of the return value is
171              allocated with the `malloc' call, it should be released with the
172              `free' call if it is no longer in use.
173
174

API FOR SEARCH CONDITIONS

176       The  API  for search conditions aims to specify search conditions given
177       to the index.
178
179       The type of the structure `ESTCOND' is for abstraction of search condi‐
180       tions.   A  unit of search conditions is composed of one search phrase,
181       some attribute expressions, and one order  expression.   No  entity  of
182       `ESTCOND' is accessed directly, but it is accessed by the pointer.  The
183       term of condition object means the pointer and its referent.  A  condi‐
184       tion  object is created by the function `est_cond_new' and destroyed by
185       `est_cond_delete'.  Every created condition object should be destroyed.
186
187       Condition objects are used as a parameter to search for documents  reg‐
188       istered  in  the  database so that a list of IDs of corresponding docu‐
189       ments are returned.  See the manual for  the  formats  of  expressions.
190       The encoding of conditional expressions should be UTF-8.
191
192       The  function  `est_cond_new'  is  used  in order to create a condition
193       object.
194
195       ESTCOND *est_cond_new(void);
196              The return value is an object of search conditions.
197
198       The function `est_cond_delete' is used in order to destroy a  condition
199       object.
200
201       void est_cond_delete(ESTCOND *cond);
202              `cond' specifies a condition object.
203
204       The  function  `est_cond_set_phrase' is used in order to set the search
205       phrase to a condition object.
206
207       void est_cond_set_phrase(ESTCOND *cond, const char *phrase);
208              `cond' specifies  a  condition  object.   `phrase'  specifies  a
209              search phrase.
210
211       The  function `est_cond_add_attr' is used in order to add an expression
212       for an attribute to a condition object.
213
214       void est_cond_add_attr(ESTCOND *cond, const char *expr);
215              `cond'  specifies  a  condition  object.   `expr'  specifies  an
216              expression for an attribute.
217
218       The  function `est_cond_set_order' is used in order to set the order of
219       a condition object.
220
221       void est_cond_set_order(ESTCOND *cond, const char *expr);
222              `cond'  specifies  a  condition  object.   `expr'  specifies  an
223              expression  for  the  order.   By default, the order is by score
224              descending.
225
226       The function `est_cond_set_max' is used in order  to  set  the  maximum
227       number of retrieval of a condition object.
228
229       void est_cond_set_max(ESTCOND *cond, int max);
230              `cond'  specifies a condition object.  `max' specifies the maxi‐
231              mum number of retrieval.  By default, the number of retrieval is
232              not limited.
233
234       The  function `est_cond_set_skip' is used in order to set the number of
235       skipped documents of a condition object.
236
237       void est_cond_set_skip(ESTCOND *cond, int skip);
238              `cond' specifies a condition object.  `skip' specifies the  num‐
239              ber of documents to be skipped in the search result.
240
241       The  function `est_cond_set_options' is used in order to set options of
242       retrieval of a condition object.
243
244       void est_cond_set_options(ESTCOND *cond, int options);
245              `cond'  specifies  a  condition  object.   `options'   specifies
246              options:  `ESTCONDSURE'  specifies  that  it checks every N-gram
247              key, `ESTCONDUSUAL', which is the  default,  specifies  that  it
248              checks  N-gram  keys  with skipping one key, `ESTCONDFAST' skips
249              two keys, `ESTCONDAGITO' skips three keys, `ESTCONDNOIDF' speci‐
250              fies  not to perform TF-IDF tuning, `ESTCONDSIMPLE' specifies to
251              use simplified phrase, `ESTCONDROUGH' specifies  to  use  rustic
252              phrase, `ESTCONDUNION' specifies to use union phrase, `ESTCONDI‐
253              SECT' specifies to use intersection phrase, `ESTCONDSCFB' speci‐
254              fies  to feed back scores (only for debugging).  Each option can
255              be specified at the same  time  by  bitwise  or.   If  keys  are
256              skipped,  though  search  speed is improved, the relevance ratio
257              grows less.
258
259       The function `est_cond_set_auxiliary' is used in order to  set  permis‐
260       sion to adopt result of the auxiliary index.
261
262       void est_cond_set_auxiliary(ESTCOND *cond, int min);
263              `cond'  specifies a condition object.  `min' specifies the mini‐
264              mum hits to adopt result of the auxiliary index.  If it  is  not
265              more than 0, the auxiliary index is not used.  By default, it is
266              32.
267
268       The function `est_cond_set_eclipse' is used in order to set  the  lower
269       limit of similarity eclipse.
270
271       void est_cond_set_eclipse(ESTCOND *cond, double limit);
272              `cond'  specifies  a  condition  object.   `limit' specifies the
273              lower limit of similarity for documents to be  eclipsed.   Simi‐
274              larity  is between 0.0 and 1.0.  If the limit is added by `ESTE‐
275              CLSIMURL', similarity is weighted  by  URL.   If  the  limit  is
276              `ESTECLSERV',  similarity  is  ignored and documents in the same
277              server are eclipsed.  If the limit is `ESTECLDIR', similarity is
278              ignored  and  documents  in the same directory are eclipsed.  If
279              the limit is `ESTECLFILE', similarity is ignored  and  documents
280              of the same file are eclipsed.
281
282       The  function  `est_cond_set_distinct'  is  used  in  order  to set the
283       attribute distinction filter.
284
285       void est_cond_set_distinct(ESTCOND *cond, const char *name);
286              `cond' specifies a condition object.  `name' specifies the  name
287              of  an  attribute to be distinct.  If this filter is set, candi‐
288              dates which have same value of the attribute is omitted.
289
290       The function `est_set_cond_mask' is used in order to set  the  mask  of
291       targets of meta search.
292
293       void est_cond_set_mask(ESTCOND *cond, int mask);
294              `cond' specifies a condition object.  `mask' specifies a masking
295              number.  1 means the first target, 2 means the second target,  4
296              means  the  third target, and power values of 2 and their summa‐
297              tion compose the mask.
298
299

API FOR DATABASE

301       The API for database aims to handle the database of the index.
302
303       The type of the structure `ESTDB' is for abstraction of access  methods
304       to  database.   A  database has inverted index, document data, and meta
305       data.  One of writer or reader  is  selected  when  the  connection  is
306       established.   No  entity  of  `ESTDB'  is accessed directly, but it is
307       accessed by the pointer.  The term of database object means the pointer
308       and  its  referent.   A  database  object  is  created  by the function
309       `est_db_open' and destroyed by `est_db_close'.  Every created  database
310       object should be destroyed.
311
312       Errors   with   some   operations  are  informed  to  by  the  function
313       `est_db_error'.  The meaning of each error code  can  be  gotten  as  a
314       string by the function `est_err_msg'.
315
316       The following constant are defined for error codes.
317
318       The  function  `est_err_msg'  is  used in order to get the string of an
319       error code.
320
321       const char *est_err_msg(int ecode);
322              `ecode' specifies an error code.  The return value is the string
323              of the error code.
324
325       The function `est_db_open' is used in order to open a database.
326
327       ESTDB *est_db_open(const char *name, int omode, int *ecp);
328              `name'  specifies  the  name  of  a database directory.  `omode'
329              specifies open modes: `ESTDBWRITER' as a  writer,  `ESTDBREADER'
330              as a reader.  If the mode is `ESTDBWRITER', the following may be
331              added by bitwise or: `ESTDBCREAT', which means it creates a  new
332              database  if  not  exist, `ESTDBTRUNC', which means it creates a
333              new database regardless if one exists.   Both  of  `ESTDBREADER'
334              and   `ESTDBWRITER' can be added to by bitwise or: `ESTDBNOLCK',
335              which means it opens a database file without  file  locking,  or
336              `ESTDBLCKNB', which means locking is performed without blocking.
337              If `ESTDBNOLCK' is used,  the  application  is  responsible  for
338              exclusion  control.  `ESTDBCREAT' can be added to by bitwise or:
339              `ESTDBPERFNG', which means N-gram analysis is performed  against
340              European  text  also, `ESTDBCHRCAT', which means character cate‐
341              gory analysis is performed instead of N-gram analysis,  `ESTDBS‐
342              MALL',  which  means  the  index  is tuned to register less than
343              50000 documents, `ESTDBLARGE', which means the index is tuned to
344              register  more  than  300000 documents, `ESTDBHUGE', which means
345              the index is tuned to  register  more  than  1000000  documents,
346              `ESTDBHUGE2',  which  means  the index is tuned to register more
347              than 5000000 documents, `ESTDBHUGE3', which means the  index  is
348              tuned  to  register more than 10000000 documents, `ESTDBSCVOID',
349              which means scores are stored as void, `ESTDBSCINT', which means
350              scores  are stored as 32-bit integer, `ESTDBSCASIS', which means
351              scores are stored as-is and marked not to be tuned when  search.
352              `ecp'  specifies  the  pointer  to a variable to which the error
353              code is assigned.  The return value is a database object of  the
354              database or `NULL' if failure.
355
356       The function `est_db_close' is used in order to close a database.
357
358       int est_db_close(ESTDB *db, int *ecp);
359              `db'  specifies  a database object.  `ecp' specifies the pointer
360              to a variable to which the error code is assigned.   The  return
361              value is true if success, else it is false.
362
363       The  function  `est_db_error' is used in order to get the last happened
364       error code of a database.
365
366       int est_db_error(ESTDB *db);
367              `db' specifies a database object.  The return value is the  last
368              happened error code of the database.
369
370       The  function  `est_db_fatal' is used in order to check whether a data‐
371       base has a fatal error.
372
373       int est_db_fatal(ESTDB *db);
374              `db' specifies a database object.  The return value is  true  if
375              the database has fatal error, else it is false.
376
377       The  function  `est_db_add_attr_index' is used in order to add an index
378       for narrowing or sorting with document attributes.
379
380       int est_db_add_attr_index(ESTDB *db, const char *name, int type);
381              `db' specifies a database object connected as a writer.   `name'
382              specifies  the  name of an attribute.  `type' specifies the data
383              type  of  attribute  index;  `ESTIDXATTRSEQ'  for   multipurpose
384              sequencial  access  method,  `ESTIDXATTRSTR'  for narrowing with
385              attributes  as  strings,  `ESTIDXATTRNUM'  for  narrowing   with
386              attributes  as  numbers.   The  return value is true if success,
387              else it is false.  Note that  this  function  should  be  called
388              before the first document is registered.
389
390       The  function  `est_db_flush'  is used in order to flush index words in
391       the cache of a database.
392
393       int est_db_flush(ESTDB *db, int max);
394              `db' specifies a database object connected as a  writer.   `max'
395              specifies  the maximum number of words to be flushed.  If it not
396              more than zero, all words are flushed.  The return value is true
397              if success, else it is false.
398
399       The  function  `est_db_sync'  is  used in order to synchronize updating
400       contents of a database.
401
402       int est_db_sync(ESTDB *db);
403              `db' specifies a database object connected  as  a  writer.   The
404              return value is true if success, else it is false.
405
406       The function `est_db_optimize' is used in order to optimize a database.
407
408       int est_db_optimize(ESTDB *db, int options);
409              `db'   specifies  a  database  object  connected  as  a  writer.
410              `options' specifies options:  `ESTOPTNOPURGE'  to  omit  purging
411              dispensable region of deleted documents, `ESTOPTNODBOPT' to omit
412              optimization of the database files.  The three can be  specified
413              at  the  same  time  by bitwise or.  The return value is true if
414              success, else it is false.
415
416       The function `est_db_merge' is used in order to merge another database.
417
418       int est_db_merge(ESTDB *db, const char *name, int options);
419              `db' specifies a database object connected as a writer.   `name'
420              specifies  the  name  of  another database directory.  `options'
421              specifies options: `ESTMGCLEAN' to clean up dispensable  regions
422              of  the  deleted document.  The return value is true if success,
423              else it is false.  Creation options of the two databases  should
424              be  same entirely.  ID numbers of imported documents are changed
425              within the sequence of the desitination database.   If  URIs  of
426              imported  documents conflict ones of exsisting documents, exist‐
427              ing documents are removed.
428
429       The function `est_db_put_doc' is used in order to add a document  to  a
430       database.
431
432       int est_db_put_doc(ESTDB *db, ESTDOC *doc, int options);
433              `db'  specifies  a database object connected as a writer.  `doc'
434              specifies a document object.  The document  object  should  have
435              the URI attribute.  `options' specifies options: `ESTPDCLEAN' to
436              clean up dispensable regions of the overwritten document,  `EST‐
437              PDWEIGHT'  to  weight  scores  statically  with  score weighting
438              attribute.  The return value is true  if  success,  else  it  is
439              false.   If  the URI attribute is same with an existing document
440              in the database, the existing one is deleted.
441
442       The function `est_db_out_doc' is used in order  to  remove  a  document
443       from a database.
444
445       int est_db_out_doc(ESTDB *db, int id, int options);
446              `db'  specifies  a  database object connected as a writer.  `id'
447              specifies the ID number of  a  registered  document.   `options'
448              specifies  options: `ESTODCLEAN' to clean up dispensable regions
449              of the deleted document.  The return value is true  if  success,
450              else it is false.
451
452       The function `est_db_edit_doc' is used in order to edit attributes of a
453       document in a database.
454
455       int est_db_edit_doc(ESTDB *db, ESTDOC *doc);
456              `db' specifies a database object connected as a  writer.   `doc'
457              specifies  a  document object.  The return value is true if suc‐
458              cess, else it is false.  The ID can not be changed.  If the  URI
459              is  changed  and it overlaps the URI of another registered docu‐
460              ment, this function fails.
461
462       The function `est_db_get_doc' is used in order to retrieve  a  document
463       in a database.
464
465       ESTDOC *est_db_get_doc(ESTDB *db, int id, int options);
466              `db'  specifies a database object.  `id' specifies the ID number
467              of a registered document.  `options'  specifies  options:  `EST‐
468              GDNOATTR' to ignore attributes, `ESTGDNOTEXT' to ignore the body
469              text, `ESTGDNOKWD' to ignore keywords.  The two can be specified
470              at  the same time by bitwise or.  The return value is a document
471              object.  It should be deleted with `est_doc_delete' if it is  no
472              longer in use.  On error, `NULL' is returned.
473
474       The  function  `est_db_get_doc_attr'  is  used in order to retrieve the
475       value of an attribute of a document in a database.
476
477       char *est_db_get_doc_attr(ESTDB *db, int id, const char *name);
478              `db' specifies a database object.  `id' specifies the ID  number
479              of  a  registered  document.   `name'  specifies  the name of an
480              attribute.  The return value is the value of  the  attribute  or
481              `NULL'  if  it does not exist.  Because the region of the return
482              value is allocated with the `malloc' call, it should be released
483              with the `free' call if it is no longer in use.
484
485       The  function  `est_db_uri_to_id'  is  used in order to get the ID of a
486       document specified by URI.
487
488       int est_db_uri_to_id(ESTDB *db, const char *uri);
489              `db' specifies a database object.  `uri' specifies the URI of  a
490              registered  document.   The  return value is the ID of the docu‐
491              ment.  On error, -1 is returned.
492
493       The function `est_db_name' is used in order to get the name of a  data‐
494       base.
495
496       const char *est_db_name(ESTDB *db);
497              `db'  specifies a database object.  The return value is the name
498              of the database.  The life duration of the  returned  string  is
499              synchronous with the one of the database object.
500
501       The  function  `est_db_doc_num'  is  used in order to get the number of
502       documents in a database.
503
504       int est_db_doc_num(ESTDB *db);
505              `db' specifies a database object.  The return value is the  num‐
506              ber of documents in the database.
507
508       The  function  `est_db_word_num'  is used in order to get the number of
509       unique words in a database.
510
511       int est_db_word_num(ESTDB *db);
512              `db' specifies a database object.  The return value is the  num‐
513              ber of unique words in the database.
514
515       The  function `est_db_size' is used in order to get the size of a data‐
516       base.
517
518       double est_db_size(ESTDB *db);
519              `db' specifies a database object.  The return value is the  size
520              of the database.
521
522       The  function `est_db_search' is used in order to search a database for
523       documents corresponding a condition.
524
525       int *est_db_search(ESTDB *db, ESTCOND *cond, int *nump, CBMAP *hints);
526              `db' specifies a database object.  `cond' specifies a  condition
527              object.  `nump' specifies the pointer to a variable to which the
528              number of elements in the result is assigned.  `hints' specifies
529              a map object into which the number of documents corresponding to
530              each word is stored.  If a word is in a negative condition,  the
531              number  is  negative.   The element whose key is an empty string
532              specifies the number of whole result.  If it is  `NULL',  it  is
533              not  used.   The  return value is an array whose elements are ID
534              numbers of corresponding documents.  This  function  does  never
535              fail.   Even  if  no document corresponds or an error occurs, an
536              empty array is returned.  Because the region of the return value
537              is  allocated with the `malloc' call, it should be released with
538              the `free' call if it is no longer in use.
539
540       Search plural databases for documents corresponding a condition.
541
542       int *est_db_search_meta(ESTDB **dbs,  int  dbnum,  ESTCOND  *cond,  int
543       *nump, CBMAP *hints);
544              `dbs'  specifies  an  array whose elements are database objects.
545              `dbnum' specifies the number of elements of the  array.   `cond'
546              specifies a condition object.  `nump' specifies the pointer to a
547              variable to which the  number  of  elements  in  the  result  is
548              assigned.   `hints' specifies a map object into which the number
549              of documents corresponding to each word is stored.  If a word is
550              in  a  negative  condition, the number is negative.  The element
551              whose key is an empty  string  specifies  the  number  of  whole
552              result.   If  it is `NULL', it is not used.  The return value is
553              an array whose elements are indexes of container  databases  and
554              ID  numbers of in each database alternately.  This function does
555              never fail.  Even if no document corresponds or an error occurs,
556              an  empty  array  is returned.  Because the region of the return
557              value is allocated with the `malloc' call, it should be released
558              with the `free' call if it is no longer in use.
559
560       The function `est_db_scan_doc' is used in order to check whether a doc‐
561       ument object matches the phrase of  a  search  condition  object  defi‐
562       nitely.
563
564       int est_db_scan_doc(ESTDB *db, ESTDOC *doc, ESTCOND *cond);
565              `db'  specifies  a  database object.  `doc' specifies a document
566              object.  `cond' specifies a search condition object.  The return
567              value  is  true if the document matches the phrase of the condi‐
568              tion object definitely, else it is false.
569
570       The function `est_db_set_cache_size' is used in order to set the  maxi‐
571       mum size of the cache memory of a database.
572
573       void  est_db_set_cache_size(ESTDB *db, size_t size, int anum, int tnum,
574       int rnum);
575              `db' specifies a database object.  `size' specifies the  maximum
576              size of the index cache.  By default, it is 64MB.  If it is neg‐
577              ative, the current size is not changed.   `anum'  specifies  the
578              maximum  number  of  cached records for document attributes.  By
579              default, it is 8192.  If it is negative, the current size is not
580              changed.   `tnum' specifies the maximum number of cached records
581              for document texts.  By default, it is 1024.  If it is negative,
582              the  current  size is not changed.  `rnum' specifies the maximum
583              number of cached records for occurrence results.  By default, it
584              is 256.  If it is negative, the current size is not changed.
585
586

PARALLELING

588       Databases  of  Hyper  Estraier  are protected by file locking.  While a
589       writer is connected to a database, neither readers nor writers  can  be
590       connected.   While  a  reader is connected to a database, other readers
591       can be connect, but writers can not.
592
593       If you use multi thread, it is suggested to  use  the  MT-safe  API  of
594       Hyper  Estraier.  It is a wrapper to make the core API thread-safe.  As
595       the MT-safe API provides the same functions as with the core  API,  the
596       following is different.
597
598

AUTHOR

600       Hyper  Estraier  is  written by Mikio Hirabayashi.  You can contact the
601       author by e-mail to <mikio@users.sourceforge.net>.  Any  suggestion  or
602       bug report is welcome to the author.
603
604

ACKNOWLEDGEMENTS

606       Hyper  Estraier  was  developed  under management by Fumitoshi Ukai and
607       supports by Exploratory Software Project of Information-technology Pro‐
608       motion Agency, Japan (IPA).
609
610
612       Copyright (C) 2004-2007 Mikio Hirabayashi
613
614       Hyper  Estraier is free software; you can redistribute it and/or modify
615       it under the terms of the GNU Lesser General  Public  License  as  pub‐
616       lished  by  the  Free  Software  Foundation;  either  version  2 of the
617       License, or any later version.
618
619       Hyper Estraier is distributed in the hope that it will be  useful,  but
620       WITHOUT  ANY  WARRANTY;  without  even  the  implied  warranty  of MER‐
621       CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the  GNU  Lesser
622       General Public License for more details.
623
624       You  should  have  received  a  copy  of  the GNU Lesser General Public
625       License along with Hyper Estraier; if not, write to the  Free  Software
626       Foundation,  Inc.,  59  Temple  Place, Suite 330, Boston, MA 02111-1307
627       USA.
628
629

SEE ALSO

631       estconfig(1),   estcmd(1),   estmaster(1),   estcall(1),   estwaver(1),
632       cabin(3), estnode(3)
633
634       Please   see   http://hyperestraier.sourceforge.net/pguide-en.html  for
635       detail.
636
637
638
639Man Page                          2007-03-06                       ESTRAIER(3)
Impressum