【问题标题】:Thinking sphinx indexing error with rails 3.2使用rails 3.2思考狮身人面像索引错误
【发布时间】:2013-03-08 00:45:58
【问题描述】:

我在 ubuntu 12.04 中安装 Thinking sphinx 时遇到问题。

每当我运行 rake ts:index 时,我都会得到以下信息。

Generating configuration to /home/tom/digmenu/config/development.sphinx.conf
Sphinx 2.0.6-id64-release (r3473)
Copyright (c) 2001-2012, Andrew Aksyonoff
Copyright (c) 2008-2012, Sphinx Technologies Inc (http://sphinxsearch.com)

using config file '/home/tom/digmenu/config/development.sphinx.conf'...
FATAL: no indexes found in config file '/home/tom/digmenu/config/development.sphinx.conf'
Generating configuration to /home/tom/digmenu/config/development.sphinx.conf
Sphinx 2.0.6-id64-release (r3473)
Copyright (c) 2001-2012, Andrew Aksyonoff
Copyright (c) 2008-2012, Sphinx Technologies Inc (http://sphinxsearch.com)

using config file '/home/tom/digmenu/config/development.sphinx.conf'...
FATAL: no indexes found in config file '/home/tom/digmenu/config/development.sphinx.conf'

模型.rb

define_index 做 索引 :name, as : :re_name 结束

狮身人面像的配置文件

indexer
{
}

searchd
{
  listen = 127.0.0.1:9306:mysql41
  log = /home/tom/digmenu/log/development.searchd.log
  query_log = /home/tom/digmenu/log/development.searchd.query.log
  pid_file = /home/tom/digmenu/log/development.sphinx.pid
  workers = threads
  binlog_path = /home/tom/digmenu/tmp/binlog/development
}

我完全不知道为什么这不起作用!配置在索引期间生成但退出。

有人知道吗?

【问题讨论】:

    标签: ruby-on-rails-3.2 indexing thinking-sphinx


    【解决方案1】:

    您可能已经解决了您的问题,但无论如何都要解决。也许它会帮助别人。

    出现此问题的原因是您可能正在使用 Thinking Sphinx 3.0 或更高版本,但以旧方式定义索引,就像在 Thinking Sphinx 2.* 及更早版本中所做的那样。索引定义不再在模型本身中,而是在单独的文件中,这些文件放在app/indices 中。还有很多其他的变化,所以最好仔细阅读新文档。

    3.0 的文档在 README 文件中:https://github.com/pat/thinking-sphinx/

    “官方”文档仍然指的是旧版本,其工作方式不同:http://pat.github.com/ts/en/

    【讨论】:

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