Thread: Full text search

Full text search

From
itishree sukla
Date:
Hello everyone,

I am using full text search,  however it is not helping me to get the partial value.

For example in  my document let Pizza Hut is there, if i am searching for Pizza Hut is it giving me the values for only Pizza or a spell mistake like pizz is not returning any thing. any work around for this, please suggest.

Regards,
Itishree

Re: Full text search

From
Raghavendra
Date:

On Fri, Jul 12, 2013 at 11:48 AM, itishree sukla <itishree.sukla@gmail.com> wrote:
Hello everyone,

I am using full text search,  however it is not helping me to get the partial value.

For example in  my document let Pizza Hut is there, if i am searching for Pizza Hut is it giving me the values for only Pizza or a spell mistake like pizz is not returning any thing. any work around for this, please suggest.

Regards,
Itishree

Hope you are looking like this.

create table foo(v text);
insert into foo values('Near to my house there\'s no any Pizza Hut restuarant');
insert into foo values('I wont like pizza, but friends are crazy of it');


postgres=# select * from foo  where v ~* 'pizz';
                          v
------------------------------------------------------
 Near to my house there's no any Pizza Hut restuarant
 I wont like pizza, but friends are crazy of it
(2 rows)

postgres=# select * from foo  where v ~* 'pizza hut';
                          v
------------------------------------------------------
 Near to my house there's no any Pizza Hut restuarant
(1 row)

postgres=# select * from foo  where v ~* 'pizza';
                          v
------------------------------------------------------
 Near to my house there's no any Pizza Hut restuarant
 I wont like pizza, but friends are crazy of it
(2 rows)

or 

with ILIKE 

select * from foo where v ilike '%hut%';


---
Regards,
Raghavendra
EnterpriseDB Corporation

Re: Full text search

From
itishree sukla
Date:
Hi Raghavendra,

Thanks for your response, however i want same kind of result using full text search. is it possible?

Regards,
Itishree


On Fri, Jul 12, 2013 at 12:14 PM, Raghavendra <raghavendra.rao@enterprisedb.com> wrote:

On Fri, Jul 12, 2013 at 11:48 AM, itishree sukla <itishree.sukla@gmail.com> wrote:
Hello everyone,

I am using full text search,  however it is not helping me to get the partial value.

For example in  my document let Pizza Hut is there, if i am searching for Pizza Hut is it giving me the values for only Pizza or a spell mistake like pizz is not returning any thing. any work around for this, please suggest.

Regards,
Itishree

Hope you are looking like this.

create table foo(v text);
insert into foo values('Near to my house there\'s no any Pizza Hut restuarant');
insert into foo values('I wont like pizza, but friends are crazy of it');


postgres=# select * from foo  where v ~* 'pizz';
                          v
------------------------------------------------------
 Near to my house there's no any Pizza Hut restuarant
 I wont like pizza, but friends are crazy of it
(2 rows)

postgres=# select * from foo  where v ~* 'pizza hut';
                          v
------------------------------------------------------
 Near to my house there's no any Pizza Hut restuarant
(1 row)

postgres=# select * from foo  where v ~* 'pizza';
                          v
------------------------------------------------------
 Near to my house there's no any Pizza Hut restuarant
 I wont like pizza, but friends are crazy of it
(2 rows)

or 

with ILIKE 

select * from foo where v ilike '%hut%';


---
Regards,
Raghavendra
EnterpriseDB Corporation


Re: Full text search

From
Amit Langote
Date:
On Fri, Jul 12, 2013 at 12:56 PM, itishree sukla
<itishree.sukla@gmail.com> wrote:
> Hi Raghavendra,
>
> Thanks for your response, however i want same kind of result using full text
> search. is it possible?
>

What do you mean when you say you are using full text search? Like
what is the query that you used? That would be helpful.


--
Amit Langote