Full text search on partial URLs

From: Zev Benjamin <zev-pgsql(at)strangersgate(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Full text search on partial URLs
Date: 2013-11-06 18:45:35
Message-ID: 527A8E4F.8070400@strangersgate.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

I have Postgres full text search set up for my application and it's been
working great! However, my users would like their searches to turn up
parts of URLs. For example, they would like a search for "foobar" to
turn up a document that contains the string
"http://example.com/foobar/blah" (and similarly for queries like
"example" and "blah). With the default dictionaries for host, url, and
url_path, the search query would have to contain the complete host or
url path.

What is the best way to accomplish this? Should I be looking at
building a custom dictionary that breaks down hosts and urls or is there
something simpler I can do?

Thanks,
Zev

Responses

Browse pgsql-general by date

  From Date Subject
Next Message bricklen 2013-11-06 18:47:38 Re: Full text search on partial URLs
Previous Message Jeff Janes 2013-11-06 18:32:22 Re: After upgrade to 9.3, streaming replication fails to start