From: | "Fco(dot) Mario Barcala" Rodríguez <lbarcala(at)freeresearch(dot)org> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Case sensitive full text searching |
Date: | 2008-09-03 16:21:59 |
Message-ID: | 1220458919.5819.9.camel@tambre |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi all:
Is there any way to create a case sensitive full text index? My target
is to make case sensitive full text searches but I don't know how.
I could create a configurario for full text searching:
CREATE TEXT SEARCH CONFIGURATION public.myconfiguration (PARSER =
pg_catalog.default);
CREATE TEXT SEARCH DICTIONARY public.my_dict (
TEMPLATE = pg_catalog.simple,
STOPWORDS = my_stops
);
ALTER TEXT SEARCH CONFIGURATION myconfiguration
ALTER MAPPING FOR asciiword, asciihword, hword_asciipart,
word, hword, hword_part
WITH my_dict;
And then create the full text index:
CREATE INDEX textindexsensible ON documento
USING gin(to_tsvector('myconfiguration',texto));
But default behaviour of Simple Dictionary returns the lower-cased form
of the word if it isn't in stopwords list. Is there any way to change
this behaviour?
Thanks in advance,
Mario Barcala
P.S. I am using PostgreSQL 8.3
From | Date | Subject | |
---|---|---|---|
Next Message | David West | 2008-09-03 16:24:09 | hash partitioning |
Previous Message | SCassidy | 2008-09-03 15:36:51 | Re: Oracle and Postgresql |