1

私のubuntu12.04にthinkingsphinxをインストールするのに問題があります。

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'

model.rb

define_index do indexs:name、as :: re_name end

sphinxの設定ファイル

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
}

なぜこれが機能しないのか、私にはまったくわかりません!構成はインデックス作成中に生成されましたが、終了します。

誰か考えがありますか?

4

1 に答える 1

4

すでに問題を解決しているかもしれませんが、とにかくここに行きます。多分それは他の誰かを助けるでしょう。

この問題の理由は、おそらく Thinking Sphinx 3.0 以降を使用しているのに、Thinking Sphinx 2.* 以前で行われていたような古い方法でインデックスを定義しているためです。インデックス定義は、モデル自体ではなく、別のファイルにあり、app/indices. 他にも多くの変更が加えられているため、新しいドキュメントを注意深く読むことをお勧めします。

3.0 のドキュメントは README ファイルにあります: https://github.com/pat/thinking-sphinx/

「公式」のドキュメントはまだ古いバージョンを参照しており、動作が異なります: http://pat.github.com/ts/en/

于 2013-03-22T15:36:34.653 に答える