to_tsquery and to_tsvector .. problem with Y

Started by akp geekover 13 years ago3 messagesgeneral
Jump to latest
#1akp geek
akpgeek@gmail.com

Hi all -

We are using to_tsquery and to_tsvector quite a bit. I have
noticed that it is not searching for "Y". is there some settings I have
to do make sure when search for string that has "Y" to return the correct
results?

Thanks for the help
Regards

#2Sergey Konoplev
gray.ru@gmail.com
In reply to: akp geek (#1)
Re: to_tsquery and to_tsvector .. problem with Y

On Mon, Dec 10, 2012 at 12:38 PM, akp geek <akpgeek@gmail.com> wrote:

We are using to_tsquery and to_tsvector quite a bit. I have
noticed that it is not searching for "Y". is there some settings I have to
do make sure when search for string that has "Y" to return the correct
results?

Could you please show a query that works incorrect for you and the
default_text_search_config setting's value?

Thanks for the help
Regards

--
Sergey Konoplev
Database and Software Architect
http://www.linkedin.com/in/grayhemp

Phones:
USA +1 415 867 9984
Russia, Moscow +7 901 903 0499
Russia, Krasnodar +7 988 888 1979

Skype: gray-hemp
Jabber: gray.ru@gmail.com

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#3Andreas Joseph Krogh
andreak@officenet.no
In reply to: akp geek (#1)
Re: to_tsquery and to_tsvector .. problem with Y

<div>På mandag 10. desember 2012 kl. 21:38:45, skrev akp geek &lt;<a href="mailto:akpgeek@gmail.com" target="_blank">akpgeek@gmail.com</a>&gt;:</div>

<blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi all -
<div> </div>

<div>         We are using to_tsquery and to_tsvector quite a bit.  I have noticed that it is not searching for &quot;Y&quot;.   is there some settings I have to do make sure when search for string that has &quot;Y&quot; to return the correct results?</div>
</blockquote>

<div> </div>

<div>My guess is that the word you'r searching for ends with 'Y' and stemming removes the ending 'Y'. Try using the 'simple' dictionary, like this:</div>

<div> </div>

<div>WHERE searchable_index_col @@ to_tsquery('simple', 'emily');</div>

<div> </div>

<div class="origo-email-signature">--<br>
Andreas Joseph Krogh &lt;andreak@officenet.no&gt;      mob: +47 909 56 963<br>
Senior Software Developer / CTO - OfficeNet AS - http://www.officenet.no&lt;br&gt;
Public key: http://home.officenet.no/~andreak/public_key.asc&lt;/div&gt;

<div> </div>