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
;
60 * Common useful things for tsearch subsystem
62 extern char *get_tsearch_config_filename(const char *basename
,
63 const char *extension
);
66 * Often useful stopword list management
74 extern void readstoplist(const char *fname
, StopList
*s
,
75 char *(*wordop
) (const char *));
76 extern bool searchstoplist(StopList
*s
, char *key
);
79 * Interface with dictionaries
82 /* return struct for any lexize function */
86 * number of variant of split word , for example Word 'fotballklubber'
87 * (norwegian) has two varian to split: ( fotball, klubb ) and ( fot,
88 * ball, klubb ). So, dictionary should return: nvariant lexeme 1 fotball
89 * 1 klubb 2 fot 2 ball 2 klubb
99 #define TSL_ADDPOS 0x01
100 #define TSL_PREFIX 0x02
103 * Struct for supporting complex dictionaries like thesaurus.
104 * 4th argument for dictlexize method is a pointer to this
108 bool isend
; /* in: marks for lexize_info about text end is
110 bool getnext
; /* out: dict wants next lexeme */
111 void *private; /* internal dict state between calls with
115 #endif /* _PG_TS_PUBLIC_H_ */