狮身人面像“言语”的结果

时间:2011-10-11 13:47:41

标签: python sphinx words

我用文本“test for test”运行查询... 并从列表中获得sphinxapi(python)的结果:

'words': [{'docs': 281, 'hits': 340, 'word': 't230'}, 2011-10-11 19:42:06+0600 [-] {'docs': 4396, 'hits': 6317, 'word': 'a53'}, 2011-10-11 19:42:06+0600 [-] {'docs': 2453, 'hits': 2917, 'word': 'f60'}]}]

如何得到“正常”字样?

Sphinx 0.9.9-release(r2117)

1 个答案:

答案 0 :(得分:2)

可能有点迟,但“t230”似乎是“test”的soundex版本。

在sphinx.conf文件的index { ... }部分中,检查morphology是否包含值soundex

如果您对morphology行进行评论(默认设置为none)并重新编制索引,您会看到words会显示您正在输入的内容。

请注意,更改形态会影响Sphinx索引文档的方式,并且搜索结果将会/可能会有所不同。