Text search prefix matching and stop words - Mailing list pgsql-bugs

From Matthew Nelson
Subject Text search prefix matching and stop words
Date
Msg-id 039b712e-e02f-4470-b6b4-7f810cc1bcb5@www.fastmail.com
Whole thread Raw
Responses Re: Text search prefix matching and stop words  (Pavel Borisov <pashkin.elfe@gmail.com>)
List pgsql-bugs
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
eachsuccessive character executing a search, "ove" and "overh" matched a particular document, but "over" did not.
 

Reproduced in PostgreSQL 11, 13, and 14.



pgsql-bugs by date:

Previous
From: "Narayanan Iyer"
Date:
Subject: RE: GROUP BY using tablename.* does not work if tablename has 1 column with NULL values
Next
From: Pavel Borisov
Date:
Subject: Re: Text search prefix matching and stop words