From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "sandeep prakash dhumale" <sandy9940(at)rediffmail(dot)com> |
Cc: | pgsql-sql(at)postgresql(dot)org, pgsql-general(at)postgresql(dot)org |
Subject: | Re: Tsearch not searching 'Y' |
Date: | 2010-04-29 14:01:31 |
Message-ID: | 10739.1272549691@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-sql |
"sandeep prakash dhumale" <sandy9940(at)rediffmail(dot)com> writes:
> I am trying to get tsearch working for my application but I am facing a
> problem when alphabet 'Y' is the in the tsquery.
> # SELECT 'hollywood'::tsvector @@ to_tsquery('holly:*');
> ?column?
> ----------
> f
> (1 row)
You can't use to_tsquery for this sort of thing, because it tries to
normalize the given words:
regression=# select to_tsquery('holly:*');
to_tsquery
------------
'holli':*
(1 row)
If you do this it works:
regression=# SELECT 'hollywood'::tsvector @@ 'holly:*'::tsquery;
?column?
----------
t
(1 row)
So if you want to use prefix matching, don't normalize.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Geoffrey | 2010-04-29 14:09:31 | Re: using between with dates |
Previous Message | Geoffrey | 2010-04-29 13:58:26 | using between with dates |
From | Date | Subject | |
---|---|---|---|
Next Message | sandeep prakash dhumale | 2010-04-29 14:14:10 | Re: Re: [GENERAL] [SQL] Tsearch not searching 'Y' |
Previous Message | Kenneth Marshall | 2010-04-29 13:56:02 | Re: [SQL] Tsearch not searching 'Y' |