On 11/02/10 17:11, Moe wrote:
You might want to summarize down to a separate (word,frequency) table.
Particularly if you don't want stemming to interfere with your suggestions.

Stemming is ok. That's fine.

How would this normally be implemented?  Should I go through my text word by
word myself, or the already existing index and copy over to a new table? Not
sure how this would be managable. Every change to something would require a
word count down, and then a word up after.

I wouldn't bother keeping it 100% up-to-date. You only want the most-plausible suggestions anyway. Have a look at the ts_stat() function.

http://www.postgresql.org/docs/8.4/interactive/textsearch-features.html

Run it overnight, and summarise to a separate table, then just use "like" against it.

Otherwise, like you say, your database will spend most of its time adding up word counts etc.

--
  Richard Huxton
  Archonet Ltd

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to