Re: Connection Broken with Custom Dicts for TSearch2

Lists: pgsql-hackers
From: "Rodrigo Hjort" <rodrigo(dot)hjort(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Connection Broken with Custom Dicts for TSearch2
Date: 2006-06-02 18:34:52
Message-ID: 731083980606021134u5b74b5ecta7cf2f8868b2d715@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Sorry, but I thought it that was the most appropriate list for the issue.

I was following these instructions:
http://www.sai.msu.su/~megera/postgres/gist/tsearch/V2/docs/custom-dict.html

And what happens is that the function works just once. Perhaps a malloc/free
issue?

$ psql fuzzy

fuzzy=# select to_tsvector('the quick brown fox jumped over the lazy dog
100');
to_tsvector
--------------------------------------------------------------------
'dog':9 'fox':4 'jump':5 'lazi':8 'brown':3 'quick':2 'hundred':10
(1 registro)

fuzzy=# select to_tsvector('the quick brown fox jumped over the lazy dog
100');
server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
A conexão com servidor foi perdida. Tentando reiniciar: Falhou.
!> \q

Regards,

Rodrigo Hjort
http://icewall.org/~hjort


From: Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>
To: Rodrigo Hjort <rodrigo(dot)hjort(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Connection Broken with Custom Dicts for TSearch2
Date: 2006-06-02 18:50:08
Message-ID: Pine.GSO.4.63.0606022249140.24663@ra.sai.msu.su
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Rodrigo,

you gave us too little information. Did you use your own dictionary ?
What's your configuration, version, etc.

Oleg
On Fri, 2 Jun 2006, Rodrigo Hjort wrote:

> Sorry, but I thought it that was the most appropriate list for the issue.
>
> I was following these instructions:
> http://www.sai.msu.su/~megera/postgres/gist/tsearch/V2/docs/custom-dict.html
>
> And what happens is that the function works just once. Perhaps a malloc/free
> issue?
>
>
> $ psql fuzzy
>
> fuzzy=# select to_tsvector('the quick brown fox jumped over the lazy dog
> 100');
> to_tsvector
> --------------------------------------------------------------------
> 'dog':9 'fox':4 'jump':5 'lazi':8 'brown':3 'quick':2 'hundred':10
> (1 registro)
>
> fuzzy=# select to_tsvector('the quick brown fox jumped over the lazy dog
> 100');
> server closed the connection unexpectedly
> This probably means the server terminated abnormally
> before or while processing the request.
> A conex?o com servidor foi perdida. Tentando reiniciar: Falhou.
> !> \q
>
>
> Regards,
>
> Rodrigo Hjort
> http://icewall.org/~hjort
>

Regards,
Oleg
_____________________________________________________________
Oleg Bartunov, Research Scientist, Head of AstroNet (www.astronet.ru),
Sternberg Astronomical Institute, Moscow University, Russia
Internet: oleg(at)sai(dot)msu(dot)su, http://www.sai.msu.su/~megera/
phone: +007(495)939-16-83, +007(495)939-23-83


From: "Rodrigo Hjort" <rodrigo(dot)hjort(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Connection Broken with Custom Dicts for TSearch2
Date: 2006-06-02 22:55:02
Message-ID: 731083980606021555x1a91daa2kec2c8388ab1cc14@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Oleg,

Actually I got PG 8.1.4 compiled from source on a Debian GNU/Linux
2.6.16-k7-2.
My locale is pt_BR, but I configured TSearch2 to use rules from the
'simple'.
Then I just followed the instructions from the link. The fact is that it
only works at the first time.

Regards,

Rodrigo Hjort
http://icewall.org/~hjort

2006/6/2, Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>:
>
> Rodrigo,
>
> you gave us too little information. Did you use your own dictionary ?
> What's your configuration, version, etc.
>
> Oleg


From: Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>
To: Rodrigo Hjort <rodrigo(dot)hjort(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Connection Broken with Custom Dicts for TSearch2
Date: 2006-06-03 06:06:57
Message-ID: Pine.GSO.4.63.0606031004590.24663@ra.sai.msu.su
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Fri, 2 Jun 2006, Rodrigo Hjort wrote:

> Oleg,
>
> Actually I got PG 8.1.4 compiled from source on a Debian GNU/Linux
> 2.6.16-k7-2.
> My locale is pt_BR, but I configured TSearch2 to use rules from the
> 'simple'.
> Then I just followed the instructions from the link. The fact is that it
> only works at the first time.

Rodrigo, it's not enough. If you built your dictionary, please, post it,
as well as tsearch2 configuration.

>
> Regards,
>
> Rodrigo Hjort
> http://icewall.org/~hjort
>
>
> 2006/6/2, Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>:
>>
>> Rodrigo,
>>
>> you gave us too little information. Did you use your own dictionary ?
>> What's your configuration, version, etc.
>>
>> Oleg
>

Regards,
Oleg
_____________________________________________________________
Oleg Bartunov, Research Scientist, Head of AstroNet (www.astronet.ru),
Sternberg Astronomical Institute, Moscow University, Russia
Internet: oleg(at)sai(dot)msu(dot)su, http://www.sai.msu.su/~megera/
phone: +007(495)939-16-83, +007(495)939-23-83


From: Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>
To: Rodrigo Hjort <rodrigo(dot)hjort(at)gmail(dot)com>, Teodor Sigaev <teodor(at)sigaev(dot)ru>
Cc: Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Connection Broken with Custom Dicts for TSearch2
Date: 2006-06-03 06:13:46
Message-ID: Pine.GSO.4.63.0606031013010.24663@ra.sai.msu.su
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Aha,

I got the same problem on 8.2dev.

Oleg
On Fri, 2 Jun 2006, Rodrigo Hjort wrote:

> Oleg,
>
> Actually I got PG 8.1.4 compiled from source on a Debian GNU/Linux
> 2.6.16-k7-2.
> My locale is pt_BR, but I configured TSearch2 to use rules from the
> 'simple'.
> Then I just followed the instructions from the link. The fact is that it
> only works at the first time.
>
> Regards,
>
> Rodrigo Hjort
> http://icewall.org/~hjort
>
>
> 2006/6/2, Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>:
>>
>> Rodrigo,
>>
>> you gave us too little information. Did you use your own dictionary ?
>> What's your configuration, version, etc.
>>
>> Oleg
>

Regards,
Oleg
_____________________________________________________________
Oleg Bartunov, Research Scientist, Head of AstroNet (www.astronet.ru),
Sternberg Astronomical Institute, Moscow University, Russia
Internet: oleg(at)sai(dot)msu(dot)su, http://www.sai.msu.su/~megera/
phone: +007(495)939-16-83, +007(495)939-23-83


From: Teodor Sigaev <teodor(at)sigaev(dot)ru>
To: Rodrigo Hjort <rodrigo(dot)hjort(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Connection Broken with Custom Dicts for TSearch2
Date: 2006-06-05 15:12:43
Message-ID: 448449EB.2080502@sigaev.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Sorry, it isn't mentioned on page, but this example of code working only with
before 8.1 versions. In 8.1 interface to dictionary was changed.

More precisely, in 8.1, lexize function (in num2english dlexize_num2english())
should return pointer to TSLexeme array instead of char**.

Rodrigo Hjort wrote:
> Sorry, but I thought it that was the most appropriate list for the issue.
>
> I was following these instructions:
> http://www.sai.msu.su/~megera/postgres/gist/tsearch/V2/docs/custom-dict.html
> <http://www.sai.msu.su/~megera/postgres/gist/tsearch/V2/docs/custom-dict.html>
>
> And what happens is that the function works just once. Perhaps a
> malloc/free issue?
>
>
> $ psql fuzzy
>
> fuzzy=# select to_tsvector('the quick brown fox jumped over the lazy dog
> 100');
> to_tsvector
> --------------------------------------------------------------------
> 'dog':9 'fox':4 'jump':5 'lazi':8 'brown':3 'quick':2 'hundred':10
> (1 registro)
>
> fuzzy=# select to_tsvector('the quick brown fox jumped over the lazy dog
> 100');
> server closed the connection unexpectedly
> This probably means the server terminated abnormally
> before or while processing the request.
> A conexão com servidor foi perdida. Tentando reiniciar: Falhou.
> !> \q
>
>
> Regards,
>
> Rodrigo Hjort
> http://icewall.org/~hjort
>

--
Teodor Sigaev E-mail: teodor(at)sigaev(dot)ru
WWW: http://www.sigaev.ru/


From: Teodor Sigaev <teodor(at)sigaev(dot)ru>
To: Teodor Sigaev <teodor(at)sigaev(dot)ru>
Cc: Rodrigo Hjort <rodrigo(dot)hjort(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org, Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>
Subject: Re: Connection Broken with Custom Dicts for TSearch2
Date: 2006-06-05 15:58:02
Message-ID: 4484548A.2070502@sigaev.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Teodor Sigaev wrote:
> Sorry, it isn't mentioned on page, but this example of code working only
> with before 8.1 versions. In 8.1 interface to dictionary was changed.

Try attached dict_tmpl.c

2Oleg: place file on site, pls

--
Teodor Sigaev E-mail: teodor(at)sigaev(dot)ru
WWW: http://www.sigaev.ru/

Attachment Content-Type Size
dict_tmpl.c text/x-csrc 5.6 KB

From: Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>
To: Teodor Sigaev <teodor(at)sigaev(dot)ru>
Cc: Rodrigo Hjort <rodrigo(dot)hjort(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Connection Broken with Custom Dicts for TSearch2
Date: 2006-06-05 19:50:53
Message-ID: Pine.GSO.4.63.0606052350460.24663@ra.sai.msu.su
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Mon, 5 Jun 2006, Teodor Sigaev wrote:

>
>
> Teodor Sigaev wrote:
>> Sorry, it isn't mentioned on page, but this example of code working only
>> with before 8.1 versions. In 8.1 interface to dictionary was changed.
>
> Try attached dict_tmpl.c
>
> 2Oleg: place file on site, pls

done

>
>

Regards,
Oleg
_____________________________________________________________
Oleg Bartunov, Research Scientist, Head of AstroNet (www.astronet.ru),
Sternberg Astronomical Institute, Moscow University, Russia
Internet: oleg(at)sai(dot)msu(dot)su, http://www.sai.msu.su/~megera/
phone: +007(495)939-16-83, +007(495)939-23-83


From: "John Jawed" <johnjawed(at)gmail(dot)com>
To: "Oleg Bartunov" <oleg(at)sai(dot)msu(dot)su>
Cc: "Teodor Sigaev" <teodor(at)sigaev(dot)ru>, "Rodrigo Hjort" <rodrigo(dot)hjort(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Connection Broken with Custom Dicts for TSearch2
Date: 2006-06-06 18:11:11
Message-ID: a9eb35850606061111v561217c9x660ad1f443822862@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Since we are on the topic, is there a timeline/plans for openfts being
brought into core? If not, I'll continue my work on bringing it into
Gentoo Portage.

John

On 6/5/06, Oleg Bartunov <oleg(at)sai(dot)msu(dot)su> wrote:
> On Mon, 5 Jun 2006, Teodor Sigaev wrote:
>
> >
> >
> > Teodor Sigaev wrote:
> >> Sorry, it isn't mentioned on page, but this example of code working only
> >> with before 8.1 versions. In 8.1 interface to dictionary was changed.
> >
> > Try attached dict_tmpl.c
> >
> > 2Oleg: place file on site, pls
>
> done
>
> >
> >
>
> Regards,
> Oleg
> _____________________________________________________________
> Oleg Bartunov, Research Scientist, Head of AstroNet (www.astronet.ru),
> Sternberg Astronomical Institute, Moscow University, Russia
> Internet: oleg(at)sai(dot)msu(dot)su, http://www.sai.msu.su/~megera/
> phone: +007(495)939-16-83, +007(495)939-23-83
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: In versions below 8.0, the planner will ignore your desire to
> choose an index scan if your joining column's datatypes do not
> match
>


From: Teodor Sigaev <teodor(at)sigaev(dot)ru>
To: John Jawed <johnjawed(at)gmail(dot)com>
Cc: Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>, Rodrigo Hjort <rodrigo(dot)hjort(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Connection Broken with Custom Dicts for TSearch2
Date: 2006-06-07 15:15:46
Message-ID: 4486EDA2.2070404@sigaev.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

> Since we are on the topic, is there a timeline/plans for openfts being
> brought into core? If not, I'll continue my work on bringing it into
> Gentoo Portage.

OpenFTS never, but tsearch2 is possible. But it requires enough work to do, so I
have doubt that it will be done in 8.2...

--
Teodor Sigaev E-mail: teodor(at)sigaev(dot)ru
WWW: http://www.sigaev.ru/


From: "Rodrigo Hjort" <rodrigo(dot)hjort(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Connection Broken with Custom Dicts for TSearch2
Date: 2006-06-07 19:54:18
Message-ID: 731083980606071254t65b2ccd6sbc95c550d8db3bbe@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

How about those "pg_ts*" tables, which are specific for a database? Will
they serve to the whole cluster?

2006/6/7, Teodor Sigaev <teodor(at)sigaev(dot)ru>:

> OpenFTS never, but tsearch2 is possible. But it requires enough work to
> do, so I
> have doubt that it will be done in 8.2...
>

--
Rodrigo Hjort
http://icewall.org/~hjort


From: Teodor Sigaev <teodor(at)sigaev(dot)ru>
To: Rodrigo Hjort <rodrigo(dot)hjort(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Connection Broken with Custom Dicts for TSearch2
Date: 2006-06-08 10:42:18
Message-ID: 4487FF0A.5060105@sigaev.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Rodrigo Hjort wrote:
> How about those "pg_ts*" tables, which are specific for a database? Will
> they serve to the whole cluster?

No, it plans per database only.

If you need in all database, you can install tsearch2 into template1, so all
newly created database will have the same tsearch2 configuration.

--
Teodor Sigaev E-mail: teodor(at)sigaev(dot)ru
WWW: http://www.sigaev.ru/