Another bug in tsearch?

Started by Christopher Kings-Lynneover 23 years ago2 messageshackers
Jump to latest
#1Christopher Kings-Lynne
chriskl@familyhealth.com.au

Hi Oleg & Teodor,

This behaviour is causing problems in my search engine:

australia=# select 'banana/pineapple'::mquery_txt;
mquery_txt
--------------------
'banana/pineapple'
(1 row)

In our case the forward slash symbol should really be treated as a word
break. Are there any cases where it shouldn't be? I can maybe only think
of 3/4, etc.

Chris

#2Oleg Bartunov
oleg@sai.msu.su
In reply to: Christopher Kings-Lynne (#1)
Re: Another bug in tsearch?

On Tue, 5 Nov 2002, Christopher Kings-Lynne wrote:

Hi Oleg & Teodor,

This behaviour is causing problems in my search engine:

australia=# select 'banana/pineapple'::mquery_txt;
mquery_txt
--------------------
'banana/pineapple'
(1 row)

In our case the forward slash symbol should really be treated as a word
break. Are there any cases where it shouldn't be? I can maybe only think
of 3/4, etc.

I wouldn't say it's a bug. It's a feature and called 'filename or path' :)
Probably we should interpret it as 3 lexems
'banana/pineapple', 'banana', 'pineapple' or 2 last lexems ?
Then you'll have a lot if noise for texts like mailing lists.
You could adapt parser to suit you needs, anyway.

Chris

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

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