【问题标题】:Sphinx WARNING: source src1: skipped 10 document(s) with zero/NULL ids狮身人面像警告:源 src1:跳过 10 个具有零/NULL id 的文档
【发布时间】:2013-08-20 16:54:29
【问题描述】:

我有问题。

当我在终端输入 /usr/local/bin/indexer --all --config /usr/local/etc/sphinx.conf 时,输出是这样的:

Sphinx 2.0.8 版本 (r3831)

版权 (c) 2001-2012,Andrew Aksyonoff

版权 (c) 2008-2012,Sphinx Technologies Inc (http://sphinxsearch.com)

使用配置文件'/usr/local/etc/sphinx.conf'...

索引索引“搜索”...

警告:源 src1:跳过了 10 个具有零/NULL id 的文档

收集了 0 个文档,0.0 MB

总共 0 个文档,0 个字节

总共 0.006 秒,0 字节/秒,0.00 文档/秒

总共 1 次读取,0.000 秒,0.0 kb/调用平均值,0.0 毫秒/调用平均值

总共 5 次写入,0.000 秒,0.0 kb/调用平均值,0.0 毫秒/调用平均值

这是我的 sphinx.conf:

https://gist.github.com/anonymous/2c1b32be9c7dd61bc24f

那么你觉得问题出在哪里?

【问题讨论】:

    标签: php mysql linux terminal sphinx


    【解决方案1】:

    作为

    GROUP BY a.id
    

    你可能只是写

    sql_query      = SELECT a.id, u.username, a.user_id,  ....
    

    【讨论】:

    • 是的,这正是我所做的。谢谢你的回答
    • 对不起,投票需要 15 个声望,但我只有 7 个:/
    【解决方案2】:

    sql_query 中的第一列始终被视为文档 ID。

    sql_query      = SELECT u.username, a.user_id, a.id, ....
    

    在您的查询中,u.username 真的是一个完全唯一的无符号 32 位整数吗?

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-10-30
      • 1970-01-01
      • 1970-01-01
      • 2013-02-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多