full text index and most frequently used words - Mailing list pgsql-general

From Bryan Murphy
Subject full text index and most frequently used words
Date
Msg-id bd8531800802080934t4a4b7acdm9d8bb3285f18756b@mail.gmail.com
Whole thread Raw
Responses Re: full text index and most frequently used words
List pgsql-general
I'm a bit of a novice writing tsearch2 queries, so forgive me if this
is a basic question.

We have a table with 2million+ records which has a considerable amount
of text content.  Some search terms (such as comedy, new, news, music,
etc.) cause a significant performance hit on our web site.  There are
simply too many records in the table, and the ranking function takes
too long to rank them all.

We've partially solved this problem by manually identifying
non-performant search queries and pre-caching the results (think
materialized view).  However, this process is starting to be become a
burden, and we can't properly anticipate what our community is going
to be searching for in the future.

What I'd like to know is if there is an easy to way to use the full
text index to generate a list of the most common words.  I could write
this code manually, but I'm hoping there's a better (simpler) way.

Thanks,
Bryan

pgsql-general by date:

Previous
From: brian
Date:
Subject: Re: ERROR: COPY quote must be a single ASCII character
Next
From: valgog
Date:
Subject: Trouble with Mixed UTF-8 and Latin1 data