如何查看 Sphinx 实际找到了什么?

How to see what Sphinx is actually finding?

我从一个非常大的数据库和一个非常复杂的配置文件的 sphinxql 查询中得到了意外的结果。我很难弄清楚我会得到这些结果。无论如何 return 结果并同时找到它找到的实际索引数据?我试图让一些 insight/clue 进入这个复杂配置文件的哪一部分来逐行查看几乎是不可能的。

您可以在 sphinxql 查询后触发 SHOW META; 以获取见解。

http://sphinxsearch.com/docs/current.html#sphinxql-show-meta

以及 SHOW META,它本身显示了很多有用的信息...

SHOW PLAN - 如果要诊断 全文查询 解析本身 http://sphinxsearch.com/docs/current.html#sphinxql-show-plan

PACKEDFACTORS() - 关于 ranking 如何计算,函数可以告诉您比您需要知道的更多的信息 http://sphinxsearch.com/docs/current.html#expr-func-packedfactors

SHOW PROFILE - 可以帮助解决 性能 问题 http://sphinxsearch.com/docs/current.html#sphinxql-show-profile

DESCRIBE indexname 通常有助于准确查看索引中的 字段和属性 http://sphinxsearch.com/docs/current.html#sphinxql-describe

最后 indextool --dumpheader 对检查特定索引的 配置 非常有用。 http://sphinxsearch.com/docs/current.html#ref-indextool (实际上它的其他命令也很有用!)