Sphinx使用php返回零值,即使String值的数据可用


Sphinx return zero value using php even if data is available for String value

我一直面临字符串属性的sphinx结果集问题。下面是我的sphinx结果集,它为字符串属性(title和其他)返回零

[matches] => Array
        (
            [0] => Array
                (
                    [id] => 83597
                    [weight] => 1
                    [attrs] => Array
                        (
                [title] => 0
                [others] => 0
                [zoneid] => 19
                [phoneverified] => 0
                [vcardenabled] => 0
             )
                )
        )
    [total] => 1
    [total_found] => 1
    [time] => 0.000

在上面的sphinx结果中,"others"answers"title"字段是String,但即使值在sphinx 中可用,它也会返回0

以下是我的预期结果。

[matches] => Array
        (
            [0] => Array
                (
                    [id] => 83597
                    [weight] => 1
                    [attrs] => Array
                        (
                [title] => 
                [others] => yadheen
                [zoneid] => 19
                [phoneverified] => 0
                [vcardenabled] => 0
             )
                )
        )
    [total] => 1
    [total_found] => 1
    [time] => 0.000

请对此提出建议

仅供参考:我使用的是斯芬克斯2.0.4

听起来像是在使用旧版本的sphinxapi代码。

请确保您使用的是最新版本——使用您下载的sphinx发行版中的版本。(在api/文件夹中)