improved support for compounds in tsearch2

From: Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>
To: openfts discussion <openfts-general(at)lists(dot)sourceforge(dot)net>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: improved support for compounds in tsearch2
Date: 2005-01-25 17:23:45
Message-ID: Pine.GSO.4.62.0501252013020.6363@ra.sai.msu.su
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi there,

we just submitted to CVS several changes to tsearch2:

1. change struct {} WordEntryPos to typedef uint16, for details see
http://www.pgsql.ru/db/mw/msg.html?mid=2035188
2. improved support for compound words

"A compound is a word containing a stem that is made up of more than one root"
to_tsquery() now make use of roots if dictionary (should support 'compoundwords' flag, check .aff
file) returns them for compound word. Example:

regression=# select to_tsquery( 'fotballklubber');
to_tsquery
------------------------------------------------
'fotball' & 'klubb' | 'fot' & 'ball' & 'klubb'
(1 row)

Bad thing is that API to tsearch2 dictionaries was changed !
See http://www.pgsql.ru/db/mw/msg.html?mid=2039406
for details and http://www.sai.msu.su/~megera/oddmuse/index.cgi/Tsearch_V2_compound_words
for introduction about compounds support in tsearch2.

We're badly needed testers of compounds support (german, norway,... languages),
patch for V8.0 release is available
http://www.sai.msu.su/~megera/postgres/gist/tsearch/V2/expand_query_8.0.patch.gz

Regards,
Oleg
_____________________________________________________________
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: oleg(at)sai(dot)msu(dot)su, http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Nicolai Tufar 2005-01-25 17:28:00 Re: Goals for 8.1
Previous Message Tom Lane 2005-01-25 17:16:58 Re: bug w/ cursors and savepoints