【问题标题】:Sphnix index_exact_words not ignoring stopwords狮身人面像索引精确词不忽略停用词
【发布时间】:2018-04-05 20:23:14
【问题描述】:

我在 Sphinx 索引上设置了 index_exact_words = 1。当我查询“黑暗”时,它返回顶部带有“黑暗”一词的结果,但“黑暗”不是第一个结果。这可能是因为它忽略了 stopwords.txt 中的“The”这个词。如何告诉 Sphinx 不要将 'The' 视为停用词,因为我想要完全匹配?

我正在使用这个词进行查询:'=The =Darkness'

(Sphinx 版本:Sphinx 2.0.9-id64-release)

谢谢。

【问题讨论】:

    标签: mysql search sphinx


    【解决方案1】:

    Sphinx 中的停用词没有索引,因此无论您是否使用完全匹配运算符都没有关系。

    但是,停用词会影响关键字排名。 “黑暗”关键字将在“黑暗”中包含 pos==1,在“黑暗”中包含 pos==0。但是您可以使用stopword_step 选项调整这些行为。如果您将其设置为0,停用词将不会影响关键字位置,并且文档“The Darkness”和“Darkness”在 Sphinx 中将相等。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-07-02
      • 1970-01-01
      相关资源
      最近更新 更多