BUG #15753: FullText search cannot find bird, rat from birds, rats

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

BUG #15753: FullText search cannot find bird, rat from birds, rats

PG Bug reporting form
The following bug has been logged on the website:

Bug reference:      15753
Logged by:          Ozan Gerdaneri
Email address:      [hidden email]
PostgreSQL version: 11.2
Operating system:   win 10
Description:        

Hi,
I have a column that contains words like cats, birds, rats ..  When I make
query with cat, it finds the column but  query doe snot return any result
with rat and bird? Do I need to make some configurations to enable this
feature?

Reply | Threaded
Open this post in threaded view
|

Re: BUG #15753: FullText search cannot find bird, rat from birds, rats

Jeff Janes
On Sun, Apr 14, 2019 at 12:30 PM PG Bug reporting form <[hidden email]> wrote:
The following bug has been logged on the website:

Bug reference:      15753
Logged by:          Ozan Gerdaneri
Email address:      [hidden email]
PostgreSQL version: 11.2
Operating system:   win 10
Description:       

Hi,
I have a column that contains words like cats, birds, rats ..  When I make
query with cat, it finds the column but  query doe snot return any result
with rat and bird? Do I need to make some configurations to enable this
feature?


You might need to change your configuration, but since you haven't told us what your configuration is, we don't know if you need to change it.

Meanwhile, the default configuration works for me.

create table foobar2 (x text);
insert into foobar2 values('cats, birds, rats');
select * from foobar2 where to_tsvector(x) @@ to_tsquery('bird');
         x
-------------------
 cats, birds, rats
 
Cheers,

Jeff