From: Matthew Nelson <mnelson@binarykeep.com>
To: pgsql-bugs@lists.postgresql.org
Subject: Text search prefix matching and stop words
Date: Fri, 08 Oct 2021 11:17:16 -0700
Message-ID: <039b712e-e02f-4470-b6b4-7f810cc1bcb5@www.fastmail.com> (raw)
Prefix matching should not omit stop words, as matching lexemes may legitimately begin with stop words.
# select to_tsquery('english', 'over:*') @@ to_tsvector('english', 'overhaul');
NOTICE: text-search query contains only stop words or doesn't contain lexemes, ignored
?column?
----------
f
(1 row)
I noticed this after implementing interactive, incremental search in an application. As the user typed "overhaul," with each successive character executing a search, "ove" and "overh" matched a particular document, but "over" did not.
Reproduced in PostgreSQL 11, 13, and 14.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: mnelson@binarykeep.com, pgsql-bugs@lists.postgresql.org
Subject: Re: Text search prefix matching and stop words
In-Reply-To: <039b712e-e02f-4470-b6b4-7f810cc1bcb5@www.fastmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox