pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Christopher Kings-Lynne <chriskl@familyhealth.com.au>
To: W.H. van Atteveldt <wouter@2at.nl>
Cc: pgsql-performance@postgresql.org
Subject: Re: Postgres query optimization with varchar fields
Date: Thu, 03 Jun 2004 09:42:46 +0800
Message-ID: <40BE8216.5000802@familyhealth.com.au> (raw)
In-Reply-To: <C7F588D7403F1F4591EB34F1E2B5CFD10B1A3E@GAIA.2at.local>
References: <C7F588D7403F1F4591EB34F1E2B5CFD10B1A3E@GAIA.2at.local>

> I am investigating whether it is useful to directly query a database
> containing a rather large text corpus (order of magnitude 100k - 1m
> newspaper articles, so around 100 million words), or whether I should
> use third party text indexing services. I want to know things such as:
> how often is a certain word (or pattern) mentioned in an article and how
> often it is mentioned with the condition that another word is nearby
> (same article or n words distant).

You really want to use the contrib/tsearch2 module that comes already 
with PostgreSQL.

cd contrib/tsearch2
gmake install
psql <mydb> < tsearch2.sql
more README.tsearch2

Chris




view thread (2+ messages)

Message-ID: <40BE8216.5000802@familyhealth.com.au>
Permalink:  ../40BE8216.5000802@familyhealth.com.au/
Also on:    postgresql.org/message-id/40BE8216.5000802@familyhealth.com.au

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: chriskl@familyhealth.com.au, wouter@2at.nl
  Subject: Re: Postgres query optimization with varchar fields
  In-Reply-To: <40BE8216.5000802@familyhealth.com.au>
  References: <C7F588D7403F1F4591EB34F1E2B5CFD10B1A3E@GAIA.2at.local> <40BE8216.5000802@familyhealth.com.au>

* 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