Re: Searching a DB index.. possible?

From: Moe <mohamed5432154321(at)gmail(dot)com>
To: Richard Huxton <dev(at)archonet(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Searching a DB index.. possible?
Date: 2010-02-11 17:11:45
Message-ID: 861fed221002110911q7916b7d1h99c2f8e08473ba80@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Feb 11, 2010 at 6:56 PM, Richard Huxton <dev(at)archonet(dot)com> wrote:

> On 05/02/10 15:48, Moe wrote:
>
>> I am trying to figure out how I can introduce full text search "tips"...
>> tips meaning, like if you start typing Mer ..
>> then a box with a couple of words underneath comes up, with *Mercedes,
>> Mercury *and so on :P
>>
>> I am thinking that the word suggestions needs to come from the already
>> existing tsearch2 index.
>> Words that are frequent in the index could be ranked higher as a search
>> tip.
>>
>
> This could get expensive if you have a large index.

> 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.

> See the manuals (full text search) for details on prefix searches -
> introduced in 8.4 if you really want to go the tsearch route.
>

I'll look into that.

--
> Richard Huxton
> Archonet Ltd
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message A. Kretschmer 2010-02-11 17:15:19 Re: Postgres Triggers issue
Previous Message Bill Moran 2010-02-11 17:08:54 pg_dump superflous warning message