Re: Partial substrings in FTS

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "PG Admin" <pgsql-admin(at)postgresql(dot)org>,"A J" <s5aly(at)yahoo(dot)com>
Subject: Re: Partial substrings in FTS
Date: 2012-04-23 18:45:19
Message-ID: 4F955CEF020000250004724A@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

A J <s5aly(at)yahoo(dot)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

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Jesper Krogh 2012-04-23 18:53:42 Re: Partial substrings in FTS
Previous Message A J 2012-04-23 17:10:10 Partial substrings in FTS