Connection Broken with Custom Dicts for TSearch2

Started by Rodrigo Hjortover 19 years ago12 messages
#1Rodrigo Hjort
rodrigo.hjort@gmail.com

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

#2Oleg Bartunov
oleg@sai.msu.su
In reply to: Rodrigo Hjort (#1)
Re: Connection Broken with Custom Dicts for TSearch2

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@sai.msu.su, http://www.sai.msu.su/~megera/
phone: +007(495)939-16-83, +007(495)939-23-83

#3Rodrigo Hjort
rodrigo.hjort@gmail.com
In reply to: Oleg Bartunov (#2)
Re: Connection Broken with Custom Dicts for TSearch2

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@sai.msu.su>:

Show quoted text

Rodrigo,

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

Oleg

#4Oleg Bartunov
oleg@sai.msu.su
In reply to: Rodrigo Hjort (#3)
Re: Connection Broken with Custom Dicts for TSearch2

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@sai.msu.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@sai.msu.su, http://www.sai.msu.su/~megera/
phone: +007(495)939-16-83, +007(495)939-23-83

#5Oleg Bartunov
oleg@sai.msu.su
In reply to: Rodrigo Hjort (#3)
Re: Connection Broken with Custom Dicts for TSearch2

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@sai.msu.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@sai.msu.su, http://www.sai.msu.su/~megera/
phone: +007(495)939-16-83, +007(495)939-23-83

#6Teodor Sigaev
teodor@sigaev.ru
In reply to: Rodrigo Hjort (#1)
Re: Connection Broken with Custom Dicts for TSearch2

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&gt;

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@sigaev.ru
WWW: http://www.sigaev.ru/

#7Teodor Sigaev
teodor@sigaev.ru
In reply to: Teodor Sigaev (#6)
1 attachment(s)
Re: Connection Broken with Custom Dicts for TSearch2

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@sigaev.ru
WWW: http://www.sigaev.ru/

Attachments:

dict_tmpl.ctext/x-csrc; name=dict_tmpl.cDownload
#8Oleg Bartunov
oleg@sai.msu.su
In reply to: Teodor Sigaev (#7)
Re: Connection Broken with Custom Dicts for TSearch2

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@sai.msu.su, http://www.sai.msu.su/~megera/
phone: +007(495)939-16-83, +007(495)939-23-83

#9John Jawed
johnjawed@gmail.com
In reply to: Oleg Bartunov (#8)
Re: Connection Broken with Custom Dicts for TSearch2

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

Show quoted text

On 6/5/06, Oleg Bartunov <oleg@sai.msu.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@sai.msu.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

#10Teodor Sigaev
teodor@sigaev.ru
In reply to: John Jawed (#9)
Re: Connection Broken with Custom Dicts for TSearch2

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@sigaev.ru
WWW: http://www.sigaev.ru/

#11Rodrigo Hjort
rodrigo.hjort@gmail.com
In reply to: Teodor Sigaev (#10)
Re: Connection Broken with Custom Dicts for TSearch2

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@sigaev.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

#12Teodor Sigaev
teodor@sigaev.ru
In reply to: Rodrigo Hjort (#11)
Re: Connection Broken with Custom Dicts for TSearch2

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@sigaev.ru
WWW: http://www.sigaev.ru/