【问题标题】:Sphinx can't find number string with length more that 15Sphinx 找不到长度超过 15 的数字字符串
【发布时间】:2019-12-17 08:12:43
【问题描述】:

我有 Sphinx 0.9.9 和“字符串”类型的字段。当我在这个字段编号中存储长度超过 15(即123456789123456789)时,Sphinx 无法通过完全相等的查询找到它。

如果我在此字段中存储qwqwwqw 123456789123456789 qqwqw,它将成功找到结果。

Sphinx 2.2 没有这个问题。

我的配置:

source resource
{
    type = xmlpipe2
    ....
    xmlpipe_field = title
    ....
}
index resources
{
    source          = resource
    path            = ....
    docinfo         = extern
    mlock           = 0
    morphology = stem_enru
    min_stemming_len    = 4
    min_word_len        = 3
    charset_type        = utf-8
    charset_table       = 0..9, A..Z->a..z, _, a..z, U+410..U+42F->U+430..U+44F, U+430..U+44F, U+002D
}

Xml 源转储:

<?xml version="1.0" encoding="utf-8"?>
<sphinx:docset>

    <sphinx:schema>
        ....
        <sphinx:field name="title" attr="string"/>
        ....
    </sphinx:schema>
    <sphinx:document id="....">
        <title><![CDATA[ .... ]]></title>
    </sphinx:document>
</sphinx:docset>

【问题讨论】:

  • 那么问题是什么,为什么不至少使用 Sphinx 2.2 呢? 0.9.9 已经过时了。
  • @ManticoreSearch 只是想知道,这是一个错误还是我可以通过配置中的一些设置来解决这个问题。
  • 你能显示你的索引配置吗?从“具有“字符串”类型的字段”开始,不清楚它是字段还是字符串属性。

标签: full-text-search sphinx


【解决方案1】:

这是一个错误。修复于https://github.com/sphinxsearch/sphinx/commit/92f722b71e051312822c18417702c6a75333a03e

请注意 0.9.9 已有 10 多年的历史,并且还有数百个其他错误。是时候升级了:)

【讨论】:

    猜你喜欢
    • 2018-01-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多