select to_tsvector('english_nostop', 'u,s') @@ to_tsquery('english_nostop', 'u<->s');
return t
, while
select to_tsvector('english_nostop', 'u.s') @@ to_tsquery('english_nostop', 'u<->s');
return f
Debug with this:
SELECT alias, token, lexemes FROM ts_debug('english_nostop', 'u.s');
alias | token | lexemes
-------+-------+---------
file | u.s | {u.s}
and
audiobook=> SELECT alias, token, lexemes FROM ts_debug('english_nostop', 'u,s');
alias | token | lexemes
-----------+-------+---------
asciiword | u | {u}
blank | , |
asciiword | s | {s}
How can remove such behavior. To make .
like ,
? The alias file
seem to think u.s
as special one.
Here is my configure:
CREATE TEXT SEARCH DICTIONARY english_stem_nostop (
Template = snowball
, Language = english
);
CREATE TEXT SEARCH CONFIGURATION public.english_nostop ( COPY = pg_catalog.english );
ALTER TEXT SEARCH CONFIGURATION public.english_nostop
ALTER MAPPING FOR asciiword, asciihword, hword_asciipart, hword, hword_part, word WITH english_stem_nostop;
ALTER TEXT SEARCH CONFIGURATION public.english_nostop DROP MAPPING FOR asciihword, hword;
And we can't simply remove file
, this will remove the total text:
ALTER TEXT SEARCH CONFIGURATION public.english_nostop DROP MAPPING FOR file;
SELECT alias, token, lexemes FROM ts_debug('english_nostop', 'u.s');
alias | token | lexemes
-------+-------+---------
file | u.s |
Which is wrong too.
And if we ALTER MAPPING for file
, we got
SELECT alias, token, lexemes FROM ts_debug('english_nostop', 'u.s');
alias | token | lexemes
-------+-------+---------
file | u.s | {u.}
Still not my purpose.