Last edit
Changed:
< * Add prefix search support to synonym dictionary. Star sign '*' at the end of definition word indicates, that definition word is a prefix
to
> * Add prefix search support to the synonym dictionary. Star sign '*' at the end of definition word indicates, that definition word is a prefix
> cat $SHAREDIR/tsearch_data/synonym_sample.syn postgres pgsql postgresql pgsql postgre pgsql gogle googl indices index* =# create text search dictionary syn( template=synonym,synonyms='synonym_sample'); =# select ts_lexize('syn','indices'); ts_lexize ----------- {index} (1 row) =# create text search configuration tst ( copy=simple); =# alter text search configuration tst alter mapping for asciiword with syn; =# select to_tsquery('tst','indices'); to_tsquery ------------ 'index':* (1 row) =# select 'indexes are very useful'::tsvector @@ to_tsquery('tst','indices'); ?column? ---------- t (1 row) =# select to_tsvector('tst','indices'); to_tsvector ------------- 'index':1 (1 row)