1 /*-------------------------------------------------------------------------
4 * Public interface to various tsearch modules, such as
5 * parsers and dictionaries.
7 * Copyright (c) 1998-2008, 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
50 HeadlineWordEntry
*words
;
62 * Common useful things for tsearch subsystem
64 extern char *get_tsearch_config_filename(const char *basename
,
65 const char *extension
);
68 * Often useful stopword list management
76 extern void readstoplist(const char *fname
, StopList
*s
,
77 char *(*wordop
) (const char *));
78 extern bool searchstoplist(StopList
*s
, char *key
);
81 * Interface with dictionaries
84 /* return struct for any lexize function */
88 * number of variant of split word , for example Word 'fotballklubber'
89 * (norwegian) has two varian to split: ( fotball, klubb ) and ( fot,
90 * ball, klubb ). So, dictionary should return: nvariant lexeme 1 fotball
91 * 1 klubb 2 fot 2 ball 2 klubb
101 #define TSL_ADDPOS 0x01
102 #define TSL_PREFIX 0x02
105 * Struct for supporting complex dictionaries like thesaurus.
106 * 4th argument for dictlexize method is a pointer to this
110 bool isend
; /* in: marks for lexize_info about text end is
112 bool getnext
; /* out: dict wants next lexeme */
113 void *private; /* internal dict state between calls with
117 #endif /* _PG_TS_PUBLIC_H_ */