SphinxQL - Sphinx搜索词的一部分


SphinxQL - Sphinx search for a part of word

我目前的Sphinx配置只返回匹配整个单词的结果,但我希望Sphinx也返回搜索单词的部分。

。如果我搜索单词块它应该返回包含包含词块的所有单词的结果,而不仅仅是精确匹配。如。百视达megablockbuster大型社区

类似于在query

中使用

我当前的SPhinxQL查询看起来像这样

SELECT id FROM disk_index1 WHERE MATCH('block') LIMIT 0,25 OPTION max_matches = 10000 

我已经试过了参考:用Sphinx搜索word的一部分

  enable_star=1

但现在已经贬值了。我甚至试过像这样运行查询

SELECT id FROM disk_index1 WHERE MATCH('*block*') LIMIT 0,25 OPTION max_matches = 10000 

但是仍然没有返回部分匹配的

如何启用部分单词匹配?in SPhinxQL ?

Sphinx Server版本:2.2.9-id64-release (rel22-r5006)

我当前的索引配置有

docinfo                 = extern
morphology              = stem_en
enable_star = 1

您可以使用min_infix_lenmin_prefix_len来实现这一点:

中缀长度设置允许使用通配符搜索术语模式,如'start*', '*end', '*middle*'等等。它也可以让你禁用短通配符,如果它们太昂贵而无法搜索。

阅读更多关于Sphinx Search当前文档