-
- Downloads
improve support of agglutinative languages (query with compound words).
regression=# select to_tsquery( '\'fotballklubber\''); to_tsquery ------------------------------------------------ 'fotball' & 'klubb' | 'fot' & 'ball' & 'klubb' (1 row) So, changed interface to dictionaries, lexize method of dictionary shoud return pointer to aray of TSLexeme structs instead of char**. Last element should have TSLexeme->lexeme == NULL. typedef struct { /* number of variant of split word , for example Word 'fotballklubber' (norwegian) has two varian to split: ( fotball, klubb ) and ( fot, ball, klubb ). So, dictionary should return: nvariant lexeme 1 fotball 1 klubb 2 fot 2 ball 2 klubb */ uint16 nvariant; /* currently unused */ uint16 flags; /* C-string */ char *lexeme; } TSLexeme;
Showing
- contrib/tsearch2/dict.c 8 additions, 8 deletionscontrib/tsearch2/dict.c
- contrib/tsearch2/dict.h 23 additions, 0 deletionscontrib/tsearch2/dict.h
- contrib/tsearch2/dict_ex.c 4 additions, 4 deletionscontrib/tsearch2/dict_ex.c
- contrib/tsearch2/dict_ispell.c 9 additions, 10 deletionscontrib/tsearch2/dict_ispell.c
- contrib/tsearch2/dict_snowball.c 3 additions, 5 deletionscontrib/tsearch2/dict_snowball.c
- contrib/tsearch2/dict_syn.c 4 additions, 5 deletionscontrib/tsearch2/dict_syn.c
- contrib/tsearch2/gendict/dict_tmpl.c.IN 5 additions, 5 deletionscontrib/tsearch2/gendict/dict_tmpl.c.IN
- contrib/tsearch2/ispell/spell.c 39 additions, 23 deletionscontrib/tsearch2/ispell/spell.c
- contrib/tsearch2/ispell/spell.h 4 additions, 3 deletionscontrib/tsearch2/ispell/spell.h
- contrib/tsearch2/query.c 33 additions, 10 deletionscontrib/tsearch2/query.c
- contrib/tsearch2/ts_cfg.c 13 additions, 12 deletionscontrib/tsearch2/ts_cfg.c
- contrib/tsearch2/ts_cfg.h 1 addition, 0 deletionscontrib/tsearch2/ts_cfg.h
Loading
Please register or sign in to comment