Thread: tsearch2: Error: Word is too long

tsearch2: Error: Word is too long

From
psql-mail@freeuk.com
Date:
I tried to index my data with tsearch2 but I get the following error:

Error: Word is too long

I have looked through the docs and googled for "Word is too long" +
tsearch2 with no luck - so i hope i haven't missed something obvious.

The problem is due to binary encodings in the data, base64 etc.

Can i supply a max word length somewhere?
and how can I find out what the max limit is?

Thanks!

--

Re: tsearch2: Error: Word is too long

From
Oleg Bartunov
Date:
On Wed, 6 Aug 2003 psql-mail@freeuk.com wrote:

> I tried to index my data with tsearch2 but I get the following error:
>
> Error: Word is too long
>
> I have looked through the docs and googled for "Word is too long" +
> tsearch2 with no luck - so i hope i haven't missed something obvious.
>
> The problem is due to binary encodings in the data, base64 etc.
>
> Can i supply a max word length somewhere?
> and how can I find out what the max limit is?
>
> Thanks!
>

Max word length is 2Kb. Unfortunately there is no simple way to redefine it.
Other problem is why do you need to index base64 ?

>

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

Re: tsearch2: Error: Word is too long

From
psql-mail@freeuk.com
Date:
Bad form to reply to my own posting i know but -

I notice that the integer dictionary can accept MAXLEN for the longest
number that is considered a valid integer. Can i set MAXLEN for the en
dictionary to be the longest word i want indexed?

I think i'd need to create a new dictionary...?

> I tried to index my data with tsearch2 but I get the following error:

>
> Error: Word is too long
>
> I have looked through the docs and googled for "Word is too long" +
> tsearch2 with no luck - so i hope i haven't missed something obvious.

>
> The problem is due to binary encodings in the data, base64 etc.
>
> Can i supply a max word length somewhere?
> and how can I find out what the max limit is?
>
> Thanks!
>

Re: tsearch2: Error: Word is too long

From
Oleg Bartunov
Date:
On Wed, 6 Aug 2003 psql-mail@freeuk.com wrote:

> Bad form to reply to my own posting i know but -
>
> I notice that the integer dictionary can accept MAXLEN for the longest
> number that is considered a valid integer. Can i set MAXLEN for the en
> dictionary to be the longest word i want indexed?
>
> I think i'd need to create a new dictionary...?

You're right. This is what I want to recommend you.


>
> > I tried to index my data with tsearch2 but I get the following error:
>
> >
> > Error: Word is too long
> >
> > I have looked through the docs and googled for "Word is too long" +
> > tsearch2 with no luck - so i hope i haven't missed something obvious.
>
> >
> > The problem is due to binary encodings in the data, base64 etc.
> >
> > Can i supply a max word length somewhere?
> > and how can I find out what the max limit is?
> >
> > Thanks!
> >
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
>                http://www.postgresql.org/docs/faqs/FAQ.html
>

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