搜索引擎 问题:Don't know how to build task 'thinking_sphinx:indexer'

xxw · 2012年11月21日 · 最后由 xxw 回复于 2012年11月22日 · 9458 次阅读

rails 3.2.1 ruby 1.9 sphinx-for-chinese+thinking_sphinx mysql5.5 运行:rake thinking_sphinx:indexer 出现:Don't know how to build task 'thinking_sphinx:indexer' 配置信息: 1.config/sphinx.yml:

development:
     searchd_binary_name: searchd
     indexer_binary_name: indexer
     charset_type: zh_ch.utf-8
     bin_path: /usr/local/sphinx/bin

【/us/local/sphinx/bin: 】 2.运行:rake thinking_sphinx:configure 生成的 development.sphinx.conf 是:

indexer
  {
  }
searchd
  {
    listen = 127.0.0.1:9312
    log = /home/wilxn/depot/log/searchd.log
    query_log = /home/wilxn/depot/log/searchd.query.log
    pid_file = /home/wilxn/depot/log/searchd.development.pid
  }

rake thinking_sphinx:index? rake -T 看看对不对嘛, 刚用 sphinx 就被我改成 elasticsearch,不记得了。

rake ts:rebuild   # Stop Sphinx (if it's running), rebuild the indexes, and start Sphinx

有说:在项目的 Rakefile 添加 require 'thinking_sphinx/tasks' 不知道什么意思,添加了也没有解决。

#1 楼 @as181920 为什么不继续用 sphix 了?

sphinx 确实快。后面需要做筛选后查询关联匹配好多复杂的逻辑,有垂直搜索等功能要做,感觉 sphinx 不好扩展开发,就换成比较慢的 java 平台了。 速度通过先异步来解决,暂时数据/用户/等等都小数据,还没有到优化速度性能的强烈需求。

还有个原因,我当初不会配中文,直接用 coreseek,有个新功能要新版本(非稳定),结果就真不稳定了。我就换了。

#6 楼 @as181920 噢 搞到最后,我的 thinking sphinx 的中文编码还是没搞好,总是显示 error:zh_ch.utf8 not found .实在找不出原因,所以换掉了 ts。

需要 登录 后方可回复, 如果你还没有账号请 注册新账号