pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedPartial substrings in FTS
3+ messages / 3 participants
[nested] [flat]
* Partial substrings in FTS
@ 2012-04-23 17:10 A J <s5aly@yahoo.com>
2012-04-23 18:45 ` Re: Partial substrings in FTS Kevin Grittner <Kevin.Grittner@wicourts.gov>
2012-04-23 18:53 ` Re: Partial substrings in FTS Jesper Krogh <jesper@krogh.cc>
0 siblings, 2 replies; 3+ messages in thread
From: A J @ 2012-04-23 17:10 UTC (permalink / raw)
To: pgsql-admin
In FTS, how do I search for partial substrings that don't form a English word.
Example, in the text: 'one hundred thirty four' I want to find the records based on 'hun'
SELECT to_tsvector('one hundred thirty four') @@ to_tsquery('hun');
does not return anything.
Thanks.
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Partial substrings in FTS
2012-04-23 17:10 Partial substrings in FTS A J <s5aly@yahoo.com>
@ 2012-04-23 18:45 ` Kevin Grittner <Kevin.Grittner@wicourts.gov>
1 sibling, 0 replies; 3+ messages in thread
From: Kevin Grittner @ 2012-04-23 18:45 UTC (permalink / raw)
To: pgsql-admin; A J <s5aly@yahoo.com>
A J <s5aly@yahoo.com> wrote:
> In FTS, how do I search for partial substrings that don't form a
> English word.
> Example, in the text: 'one hundred thirty four' I want to find
> the records based on 'hun'
>
> SELECT to_tsvector('one hundred thirty four') @@
> to_tsquery('hun'); does not return anything.
It sounds like trigrams might be a better fit for you than text
search.
http://www.postgresql.org/docs/9.1/static/pgtrgm.html
-Kevin
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Partial substrings in FTS
2012-04-23 17:10 Partial substrings in FTS A J <s5aly@yahoo.com>
@ 2012-04-23 18:53 ` Jesper Krogh <jesper@krogh.cc>
1 sibling, 0 replies; 3+ messages in thread
From: Jesper Krogh @ 2012-04-23 18:53 UTC (permalink / raw)
To: A J <s5aly@yahoo.com>; +Cc: pgsql-admin
On 23/04/2012, at 19.10, A J <s5aly@yahoo.com> wrote:
> In FTS, how do I search for partial substrings that don't form a English word.
> Example, in the text: 'one hundred thirty four' I want to find the records based on 'hun'
>
> SELECT to_tsvector('one hundred thirty four') @@ to_tsquery('hun');
> does not return anything.
Try to_tsquery('hun:*')
Jesper
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2012-04-23 18:53 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2012-04-23 17:10 Partial substrings in FTS A J <s5aly@yahoo.com>
2012-04-23 18:45 ` Kevin Grittner <Kevin.Grittner@wicourts.gov>
2012-04-23 18:53 ` Jesper Krogh <jesper@krogh.cc>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox