我使用SphinxSE而不是FULLTEXT
. Sphinx 设置适用于搜索引擎的最终用户。根据官方文档,
限制条款。支持 LIMIT N 和 LIMIT M,N 形式。与常规 SQL 不同(但与 Sphinx API 类似),默认情况下存在隐式 LIMIT 0,20。
因此,任何查询只返回 20 行
MariaDB [sphinx]> SELECT * FROM t1 WHERE query='test;mode=any';
+------+--------+---------------+
| id | weight | query |
+------+--------+---------------+
| 556 | 1 | test;mode=any |
| 864 | 1 | test;mode=any |
| 1329 | 1 | test;mode=any |
| 1781 | 1 | test;mode=any |
| 1832 | 1 | test;mode=any |
| 2157 | 1 | test;mode=any |
| 2388 | 1 | test;mode=any |
| 2889 | 1 | test;mode=any |
| 3118 | 1 | test;mode=any |
| 3155 | 1 | test;mode=any |
| 3255 | 1 | test;mode=any |
| 3485 | 1 | test;mode=any |
| 3495 | 1 | test;mode=any |
| 3623 | 1 | test;mode=any |
| 4034 | 1 | test;mode=any |
| 4525 | 1 | test;mode=any |
| 4563 | 1 | test;mode=any |
| 4659 | 1 | test;mode=any |
| 4736 | 1 | test;mode=any |
| 4807 | 1 | test;mode=any |
+------+--------+---------------+
20 rows in set (0.027 sec)
我在 中尝试了各种设置sphinx.conf
,但无法更改设置以在 SQL 查询中返回更多结果。
在文档中,您可以包含
limit=40
. 所以:不是通常的 SQL 方式,但 SphinxSE 不太正常。