From: | Holger Marzen <holger(at)marzen(dot)de> |
---|---|
To: | David Griffiths <dgriffiths(at)boats(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Work Around For Simple Oracle interMedia? |
Date: | 2002-02-13 05:48:55 |
Message-ID: | Pine.LNX.4.44.0202130645310.16640-100000@bluebell.marzen.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Tue, 12 Feb 2002, David Griffiths wrote:
> One of our two databases uses context indexes on a column.
>
> If your not familiar, this is part of the Oracle interMedia option. The idea
> here is to be able to search for words within a text block. The text block
> is in a row, in one of the columns. It can also be HTML, a Word document,
> etc. When you index the column, it speeds up finding matching words.
I am afraid you have to convert the documents to raw text or RTF first.
> Once that's done, you can search like this:
>
> SELECT SCORE(1) title FROM news_items
> WHERE CONTAINS(text, 'Bolivia', 1) > 0;
>
> This would find all rows in the table "news_item" that has the text
> "Bolivia" in the "title" column.
I don't see any problem here. "ILIKE" or "~*" seem to do the job.
> SELECT SCORE(1) title FROM news_items
> WHERE CONTAINS(text, 'Bolivia OR Peru', 1) > 0;
>
> This would find all rows in the table "news_item" that has the text
> "Bolivia" or "Peru" in the "title" column in any order.
>
> This is the most basic usage of the interMedia (you can get it to do a
> soundex to match a sound, or get a "near" match or fuzzy match rather than
> an exact match, etc.)
For fuzzy match you could write a levenshtein (sp?) function. But then
you have to extract the words from the field. That might get tricky.
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2002-02-13 06:01:18 | Re: Work Around For Simple Oracle interMedia? |
Previous Message | Lamar Owen | 2002-02-13 01:21:14 | Re: Mail archives problems |