To answer my own question - my synonym dictionary was not be applied
to '1st' because '1st' is a numword, not an asciiword, and my synonym
dictionary was not mapped to numword. To map a dictionary token class:
ALTER TEXT SEARCH CONFIGURATION english
ALTER MAPPING FOR numword WITH my_synonym_dic
Oleg,
Thank you. I am sure that you have identified my problem.
\dF+ english (output below) lists my dictionary which is named
'rwg_synonym' before numword so I would have thought that my
dictionary would have normalized '1st' to '1' before the numword
dictionary was reached. Maybe this question
Richard,
you should check your mapping - '1st' belongs to 'numword' and may be processed
in a different way than 'first' or '1'.
Oleg
On Sat, 26 Nov 2011, Richard Greenwood wrote:
I am working with street address data in which 'first st' has been
entered as '1 st' and so on. So I have created
I am working with street address data in which 'first st' has been
entered as '1 st' and so on. So I have created a text search
dictionary with entries:
first 1
1st 1
And initially it seems to be working properly:
SELECT ts_lexize('rwg_synonym','first');
ts_lexize
---
{1}
S