I have a dictionary built in this way:
DROP TEXT SEARCH DICTIONARY IF EXISTS simple_english_with_stopwords CASCADE;
CREATE TEXT SEARCH DICTIONARY simple_english_with_stopwords (TEMPLATE = pg_catalog.simple);
CREATE TEXT SEARCH CONFIGURATION simple_english_with_stopwords (copy = english);
ALTER TEXT SEARCH CONFIGURATION simple_english_with_stopwords
ALTER MAPPING FOR asciihword, asciiword, hword, hword_asciipart, hword_part, word
WITH simple_english_with_stopwords;
which should include not only generic terms but stop words.
Based on that I am expecting that something like:
SELECT to_tsvector('open plan') @@ to_tsquery('off <-> plan');
would return false
as off
is not in the text. But for some reason it is returning true
.
If I run just:
# SELECT to_tsquery('off <-> plan');
to_tsquery
------------
'plan'
(1 row)
which explains why the previous expression is returning true. But why the query has removed the off
term? Any idea?