From: | Colin M Strickland <cms(at)imdb(dot)com> |
---|---|
To: | pgsql-patches(at)postgresql(dot)org |
Subject: | postgresql-7.2.3 contrib/tsearch |
Date: | 2002-11-12 16:35:16 |
Message-ID: | 15825.11716.55164.971742@mavis.beatworm.home |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-patches |
Hi,
Recently,I've been playing around with contrib/tsearch for the first
time as I have some columns with large text fields that need fast
substring searches. The tsearch functions seem to provide the sort of
functionality I'm looking for and work really well for my (moderately
large) dataset . However I noticed a peculiarity when parsing for
stopwords with operators.
Certain combinations of stopwords and operators cause the rewriter to
incorrectly deduce that all of the query terms are stopwords and bail
out. English examples of this would be
txtid ## 'monkey|the|breakfast'
or
txtid ## 'monkey&breakfast&!the'
which both fail with the claim
ERROR: Your query contained only stopword(s), ignored
Attached is my patch that attempts to fix this situation. It is
written against contrib/tsearch/rewrite.c in the postgresql-7.2.3
stable release, only touches that file. The tsearch code doesnt look
to have changed that much in the later CVS so it should apply cleanly
there.
I don't know my way around the postgresql internals too well and only
really focused on this operator logic, so apologies in advance for
wasting anyone's time if I've misunderstood this problem.
Attachment | Content-Type | Size |
---|---|---|
unknown_filename | text/plain | 2.2 KB |
unknown_filename | text/plain | 57 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2002-11-12 20:14:52 | Re: pgcrypto/openssl fix |
Previous Message | Bruce Momjian | 2002-11-12 05:00:20 | Re: ON COMMIT temp table handling |