Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Bugs > Re: BUG #4148: ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 2 Topic 3753 of 4088
Post > Topic >>

Re: BUG #4148: tsearch related issue

by tgl@[EMAIL PROTECTED] (Tom Lane) May 7, 2008 at 11:09 AM

"" <dksingh.engineer@[EMAIL PROTECTED]
> writes:
> for query SELECT to_tsvector('surprise') it's showing result as
'surpris':1
> but when I try to search this word its returning false.

> SELECT to_tsvector('surprise') @[EMAIL PROTECTED]
 to_tsquery('surpris');

This isn't a bug, because those are not the same word.  If you looked
closer, you'd find:

regression=# SELECT to_tsvector('surprise') , to_tsquery('surpris');
 to_tsvector | to_tsquery 
-------------+------------
 'surpris':1 | 'surpri'
(1 row)

If you want to put in already-stemmed words, don't feed them through
to_tsquery, just cast directly to tsquery:

regression=# SELECT to_tsvector('surprise') @[EMAIL PROTECTED]
 'surpris'::tsquery;
 ?column? 
----------
 t
(1 row)


			regards, tom lane

-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
 




 2 Posts in Topic:
BUG #4148: tsearch related issue
dksingh.engineer@[EMAIL P  2008-05-07 08:37:13 
Re: BUG #4148: tsearch related issue
tgl@[EMAIL PROTECTED] (T  2008-05-07 11:09:43 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sun Oct 12 9:49:52 CDT 2008.