【问题标题】:Why can't I index with Thinking Sphinx?为什么我不能用 Thinking Sphinx 索引?
【发布时间】:2014-07-08 14:38:03
【问题描述】:

我已经运行 rake ts:config 来生成 Sphinx 的配置文件。

但是,当我尝试运行 rake ts:index 来创建索引时,我得到了一堆这样的错误:

indexing index 'activity_core'...
ERROR: source 'activity_core_0': unknown type 'mysql'; skipping.
ERROR: index 'activity_core': failed to configure some of the sources, will not index.

我已安装并运行 mysql Ver 14.14 Distrib 5.6.19,适用于 osx10.9 (x86_64)。

当我运行which indexer 时,它会返回/usr/local/bin/indexer

如果我被误导了,我深表歉意。我对 Sphinx 或索引没有太多经验。如果您需要更多信息,请发表评论。

【问题讨论】:

    标签: mysql sphinx thinking-sphinx


    【解决方案1】:

    看起来您的 Sphinx 版本是在没有 MySQL 支持的情况下编译的。你是如何安装狮身人面像的?您是否在 MySQL 之前安装了 Sphinx?无论哪种方式,都值得重新安装 Sphinx。

    对于那些在 OS X 上使用 Homebrew 的人,这样做是这样的:

    brew install sphinx --mysql
    

    同样值得注意的是,Thinking Sphinx 要求 Sphinx 编译时支持 MySQL,即使您使用 PostgreSQL 作为数据库也是如此(因为 MySQL 协议用于与 Sphinx 守护程序通信)。

    【讨论】:

    • 你是对的。我卸载了 Sphinx 并用brew install sphinx --mysql 重新安装了它,这就成功了。如果你愿意,你可以用这个更新你的答案。谢谢
    • 应该是 brew install sphinx --with-mysql
    • OSX + MAMP 用户“使用--with-mysql 标志卸载和重新安装”的要点
    猜你喜欢
    • 2023-04-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
    相关资源
    最近更新 更多