CREATE INDEX my_user_index ON my_user using bm25( “name”);
/* ERROR: relation “my_user_index” already exists /
/ 受影响记录行数: 0 已找到记录行: 0 警告: 0 持续时间 0 的 1 查询: 0.000 秒. /
select * from my_user ORDER BY name <&> ‘张三’ DESC LIMIT 3;
/ ERROR: No BM25 index is used to the scan, please check the plan. /
/ 受影响记录行数: 0 已找到记录行: 0 警告: 0 持续时间 0 的 1 查询: 0.000 秒. */
my_user_index是有的。使用的是6.0为啥子搜索不到。数据也是存在的
select * from my_user ORDER BY name <&> ‘张三’ DESC LIMIT 3;//不行
select * from {表名称} ORDER BY {文档列名称} <&> {查询词} DESC LIMIT n; //这种SQL不行
SELECT /+ indexscan (my_user my_user_index*)*/ *, name <&> ‘张三’ AS score FROM my_user ORDER BY name <&> ‘张三’ DESC;
//这条查询又能查询到。

