带有前缀词素的 PostgreSQL 中 tsquery 的奇怪行为

Shi*_*ami 6 sql postgresql full-text-search

当我使用 'a:*' (还有 'i:*'、's:*'、't:*')

SELECT id FROM mv_fulltextsearch1 WHERE to_tsvector(text) @@ to_tsquery('a:*') LIMIT 50;
Run Code Online (Sandbox Code Playgroud)

需要永远并大量打印以下 PostgreSQL 输出

NOTICE:  text-search query contains only stop words or doesn't contain lexemes, ignored
Run Code Online (Sandbox Code Playgroud)

但是当我使用 'b:*' 时(与 ':*' 前面的任何其他单个字母相同)

SELECT id FROM mv_fulltextsearch1 WHERE to_tsvector(text) @@ to_tsquery('b:*') LIMIT 50;
Run Code Online (Sandbox Code Playgroud)

一切都好

a、i、s 和 t 是某种特殊字符吗?我怎样才能逃脱它们/修复奇怪的行为?

Nei*_*gan 6

使用to_tsvector('simple', text)to_tsquery('simple', 'a:*')

原因是 'english' regconfig 删除了停用词,而“a”被认为是停用词

但是,“简单”的 regconfig 不会删除停用词