pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kevin Grittner <Kevin.Grittner@wicourts.gov>
To: PG Admin <pgsql-admin@postgresql.org>
To: A J <s5aly@yahoo.com>
Subject: Re: Partial substrings in FTS
Date: Mon, 23 Apr 2012 13:45:19 -0500
Message-ID: <4F955CEF020000250004724A@gw.wicourts.gov> (raw)
In-Reply-To: <1335201010.30117.YahooMailNeo@web161501.mail.bf1.yahoo.com>
References: <1335201010.30117.YahooMailNeo@web161501.mail.bf1.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



view thread (3+ messages)  latest in thread

Message-ID: <4F955CEF020000250004724A@gw.wicourts.gov>
Permalink:  ../4F955CEF020000250004724A@gw.wicourts.gov/
Also on:    postgresql.org/message-id/4F955CEF020000250004724A@gw.wicourts.gov

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: Kevin.Grittner@wicourts.gov, s5aly@yahoo.com
  Subject: Re: Partial substrings in FTS
  In-Reply-To: <4F955CEF020000250004724A@gw.wicourts.gov>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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