tsearch synonym dictionary problem

From: Richard Greenwood <richard(dot)greenwood(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: tsearch synonym dictionary problem
Date: 2009-09-06 14:51:31
Message-ID: ae9185aa0909060751m2ffcf89ch8198f7ba65fcdc29@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I have a tsearch query that does not returns results and I can not see
why. The actual data is:
7695 s hwy 89
And in my synonym dictionary I have:
south s
highway hwy
So I am expecting to get a row from the query criteria:
7695 South Highway 89
But I don't. I do get the row with any of the following:
7695 S Highway 89
7695 Highway 89

Here's a little more detail. Checking my dictionary:

tc_lands=# SELECT * FROM ts_debug('english', 'south');
alias | description | token | dictionaries |
dictionary | lexemes
-----------+-----------------+-------+----------------------------+-------------+---------
asciiword | Word, all ASCII | south | {gis_synonym,english_stem} |
gis_synonym | {s}

tc_lands=# SELECT * FROM ts_debug('english', 'highway');
alias | description | token | dictionaries |
dictionary | lexemes
-----------+-----------------+---------+----------------------------+-------------+---------
asciiword | Word, all ASCII | highway | {gis_synonym,english_stem} |
gis_synonym | {hwy}

And the actual query:

SELECT *
FROM parcel_attrib
WHERE txtsrch @@ to_tsquery('7695&south&Highway&89')

Any pointers as to what I am doing wrong would be greatly appreciated.

Regards,
--
Richard Greenwood
richard(dot)greenwood(at)gmail(dot)com
www.greenwoodmap.com

Browse pgsql-general by date

  From Date Subject
Next Message Ow Mun Heng 2009-09-06 16:26:56 Truncating table doesn't bring back (ALL?) used space?
Previous Message Tom Lane 2009-09-06 14:34:04 Re: pg_ctl with unix domain socket?