小编Shi*_*ami的帖子

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

当我使用 '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 是某种特殊字符吗?我怎样才能逃脱它们/修复奇怪的行为?

sql postgresql full-text-search

6
推荐指数
1
解决办法
880
查看次数

标签 统计

full-text-search ×1

postgresql ×1

sql ×1