> > write your own dictionary, which implements any logic you need. In your > case it's just a wrapper around ispell, which will returns original string > not stem. See example > http://www.sai.msu.su/~megera/postgres/fts/doc/fts-intdict-xmp.html > and russian article > http://www.sai.msu.su/~megera/postgres/talks/fts_pgsql_intro.html#ftsdict
Ah, I understand you! You offer to write a small Postgres contrib module (new dictionary) in C and implement all logic in it. Seems it's a bit complex solution for such a simple task (exclude surnames for lexization), but - it could be implemented, of course. > > Of course I can create all word-forms of all Russian names using ispell > and > > then - subtract this full list from Ispell dictionary (so I will remove > > "Ivan", "Ivanami" etc. from it). But possily tsearch2 has this > subtraction > > algorythm already. > > > > don't do that ! Just go plain way. > Another method is to generate a singular ** synonym dictionary based on all Russian names word-forms using ispell (we will get all suspicous surnames in this set) and add it before ispell. This solution does not need to write anything in C.