Re: tsearch2 column update produces "word too long"

From: Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>
To: Markus Wollny <Markus(dot)Wollny(at)computec(dot)de>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: tsearch2 column update produces "word too long"
Date: 2003-11-21 14:13:15
Message-ID: Pine.GSO.4.58.0311211712140.13158@ra.sai.msu.su
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, 21 Nov 2003, Markus Wollny wrote:

> Hello!
>
> > Von: Oleg Bartunov [mailto:oleg(at)sai(dot)msu(dot)su]
> > Gesendet: Freitag, 21. November 2003 13:06
> > An: Markus Wollny
> > Cc: pgsql-general(at)postgresql(dot)org
> >
> > Word length is limited by 2K. What's exactly the word
> > tsearch2 complained on ?
> > 'Llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch'
> > is fine :)
>
> This was a silly example, I know - it is a long word, but not too long
> to worry a machine. The offending word will surely be much longer, but
> as a matter of fact, I cannot think of any user actually typing a 2k+
> string without any spaces in between. I'm not sure on which word
> tsearch2 complained, it doesn't tell and even logging did not provide me
> with any more detail:
>
> 2003-11-21 14:06:44 [26497] ERROR: 42601: word is too long
> LOCATION: parsetext_v2, ts_cfg.c:294
> STATEMENT: UPDATE ct_com_board_message
> SET
> ftindex=to_tsvector('default',coalesce(user_login,'') ||' '||
> coalesce(title,'') ||' '|| coalesce(text,''));
>
> Is there some way to find the exact position?

I'm afraid you need to hack ts_cfg.c:294 yourself to print the word
which's bugging you :)

>
> > btw, don't forget to configure properly dictionaries, so you
> > don't have a lot of unique words.
>
> I won't forget that; I justed wanted to run a quick-off first test
> before diving deeper into Ispell and other issues which are as yet a bit
> of a mystery to me.
>
> Kind Regards
>
> Markus
>

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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Carmen Gloria Sepulveda Dedes 2003-11-21 14:53:55 Execute vacuum
Previous Message Manfred Koizar 2003-11-21 14:05:05 Re: Concatenation in SELECT