1 /*-------------------------------------------------------------------------
4 * Public interface to various tsearch modules, such as
5 * parsers and dictionaries.
7 * Copyright (c) 1998-2009, PostgreSQL Global Development Group
11 *-------------------------------------------------------------------------
13 #ifndef _PG_TS_PUBLIC_H_
14 #define _PG_TS_PUBLIC_H_
16 #include "tsearch/ts_type.h"
23 * returning type for prslextype method of parser
33 * Interface to headline generator
51 HeadlineWordEntry
*words
;
63 * Common useful things for tsearch subsystem
65 extern char *get_tsearch_config_filename(const char *basename
,
66 const char *extension
);
69 * Often useful stopword list management
77 extern void readstoplist(const char *fname
, StopList
*s
,
78 char *(*wordop
) (const char *));
79 extern bool searchstoplist(StopList
*s
, char *key
);
82 * Interface with dictionaries
85 /* return struct for any lexize function */
89 * number of variant of split word , for example Word 'fotballklubber'
90 * (norwegian) has two varian to split: ( fotball, klubb ) and ( fot,
91 * ball, klubb ). So, dictionary should return: nvariant lexeme 1 fotball
92 * 1 klubb 2 fot 2 ball 2 klubb
102 #define TSL_ADDPOS 0x01
103 #define TSL_PREFIX 0x02
106 * Struct for supporting complex dictionaries like thesaurus.
107 * 4th argument for dictlexize method is a pointer to this
111 bool isend
; /* in: marks for lexize_info about text end is
113 bool getnext
; /* out: dict wants next lexeme */
114 void *private; /* internal dict state between calls with
118 #endif /* _PG_TS_PUBLIC_H_ */