狮身人面像配置||配置/sphinx.yml

发布于 2024-11-15 22:31:04 字数 1916 浏览 5 评论 0原文

我的 sphinx 配置是:

================================ config/sphinx.yml
development:
  bin_path: "/usr/local/bin"
  searchd_binary_name: searchd
  indexer_binary_name: indexer

但是每次我运行 rake ts:index

Sphinx cannot be found on your system. You may need to configure the following
settings in your config/sphinx.yml file:
  * bin_path
  * searchd_binary_name
  * indexer_binary_name

For more information, read the documentation:
For more information, read the documentation:
http://freelancing-god.github.com/ts/en/advanced_config.html
Generating Configuration to config/development.sphinx.conf
Sphinx 2.0.1-beta (r2792)
Copyright (c) 2001-2011, Andrew Aksyonoff
Copyright (c) 2008-2011, Sphinx Technologies Inc (http://sphinxsearch.com)

using config file 'config/development.sphinx.conf'...
indexing index 'post_core'...
collected 2 docs, 0.0 MB
sorted 0.0 Mhits, 100.0% done
total 2 docs, 675 bytes
total 0.006 sec, 110510 bytes/sec, 327.43 docs/sec
skipping non-plain index 'post'...
total 6 reads, 0.000 sec, 0.0 kb/call avg, 0.0 msec/call avg
total 12 writes, 0.000 sec, 0.1 kb/call avg, 0.0 msec/call avg
rotating indices: succesfully sent SIGHUP to searchd (pid=19438).
Generating Configuration to config/development.sphinx.conf
Sphinx 2.0.1-beta (r2792)
Copyright (c) 2001-2011, Andrew Aksyonoff
Copyright (c) 2008-2011, Sphinx Technologies Inc (http://sphinxsearch.com)

using config file 'config/development.sphinx.conf'...
indexing index 'post_core'...
collected 2 docs, 0.0 MB
sorted 0.0 Mhits, 100.0% done
total 2 docs, 675 bytes
total 0.006 sec, 105567 bytes/sec, 312.79 docs/sec
skipping non-plain index 'post'...
total 6 reads, 0.000 sec, 0.0 kb/call avg, 0.0 msec/call avg
total 12 writes, 0.000 sec, 0.1 kb/call avg, 0.0 msec/call avg
rotating indices: succesfully sent SIGHUP to searchd (pid=19438).

那么问题是什么?为什么 rake 输出即使安装了也找不到它?

my sphinx configuration is:

================================ config/sphinx.yml
development:
  bin_path: "/usr/local/bin"
  searchd_binary_name: searchd
  indexer_binary_name: indexer

but everytime i run a rake ts:index

Sphinx cannot be found on your system. You may need to configure the following
settings in your config/sphinx.yml file:
  * bin_path
  * searchd_binary_name
  * indexer_binary_name

For more information, read the documentation:
For more information, read the documentation:
http://freelancing-god.github.com/ts/en/advanced_config.html
Generating Configuration to config/development.sphinx.conf
Sphinx 2.0.1-beta (r2792)
Copyright (c) 2001-2011, Andrew Aksyonoff
Copyright (c) 2008-2011, Sphinx Technologies Inc (http://sphinxsearch.com)

using config file 'config/development.sphinx.conf'...
indexing index 'post_core'...
collected 2 docs, 0.0 MB
sorted 0.0 Mhits, 100.0% done
total 2 docs, 675 bytes
total 0.006 sec, 110510 bytes/sec, 327.43 docs/sec
skipping non-plain index 'post'...
total 6 reads, 0.000 sec, 0.0 kb/call avg, 0.0 msec/call avg
total 12 writes, 0.000 sec, 0.1 kb/call avg, 0.0 msec/call avg
rotating indices: succesfully sent SIGHUP to searchd (pid=19438).
Generating Configuration to config/development.sphinx.conf
Sphinx 2.0.1-beta (r2792)
Copyright (c) 2001-2011, Andrew Aksyonoff
Copyright (c) 2008-2011, Sphinx Technologies Inc (http://sphinxsearch.com)

using config file 'config/development.sphinx.conf'...
indexing index 'post_core'...
collected 2 docs, 0.0 MB
sorted 0.0 Mhits, 100.0% done
total 2 docs, 675 bytes
total 0.006 sec, 105567 bytes/sec, 312.79 docs/sec
skipping non-plain index 'post'...
total 6 reads, 0.000 sec, 0.0 kb/call avg, 0.0 msec/call avg
total 12 writes, 0.000 sec, 0.1 kb/call avg, 0.0 msec/call avg
rotating indices: succesfully sent SIGHUP to searchd (pid=19438).

So what's the problem? Why does the rake output that it cant find it even though its installed?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

作妖 2024-11-22 22:31:04

Thinking Sphinx 的警告肯定会更清楚......问题很可能是您的 Thinking Sphinx 版本有多旧。较旧的 TS 版本不了解 Sphinx 2.0.x - 因此我建议更新到 Thinking Sphinx 的最新版本(Rails 1.2 和 2.x 为 1.4.6,Rails 3 为 2.0.5)。

The warning from Thinking Sphinx could definitely be clearer... the problem is very likely to be how old your version of Thinking Sphinx is. Older TS versions don't know about Sphinx 2.0.x - so I'd recommend updating to the latest version of Thinking Sphinx (either 1.4.6 for Rails 1.2 and 2.x, or 2.0.5 for Rails 3).

宣告ˉ结束 2024-11-22 22:31:04

有两件事有助于解决这个问题。首先,正如 Pat 所说,将 Thinking Sphinx 插件或 gem 更新到最新版本(Rails 2 为 1.4.x,Rails 3 为 2.0.x)很有用。其次,有时在配置文件中指定Sphinx的版本会有所帮助(您可以通过以下方式找到它)调用“indexer”),特别是当 Sphinx 在远程服务器上运行并且 Thinking Sphinx 无法在本地访问 Sphinx 时:

production:
  ..
  version: 2.0.4  # <------- Version of Sphinx on remote server 192.168.1.10
  port: 9312 
  address: 192.168.1.10
  ..

There are two things that help to solve this problem. First, as Pat says, it is useful to update the Thinking Sphinx plugin or gem to the latest version (either 1.4.x for Rails 2, or 2.0.x for Rails 3). Second it helps sometimes to specify the version of Sphinx in the configuration file (you can find it out by calling "indexer"), especially if Sphinx is running on a remote server and Thinking Sphinx does not have access to Sphinx locally:

production:
  ..
  version: 2.0.4  # <------- Version of Sphinx on remote server 192.168.1.10
  port: 9312 
  address: 192.168.1.10
  ..
能怎样 2024-11-22 22:31:04

我面临着同样的问题,到处寻找答案,但没有任何解决方案。

对我有用的技巧是安装旧版本的 sphinx。 v .9 而不是最新的测试版。

使用最新的 Thinking-Sphinx 和此版本的 sphinx 解决了该问题。

I was facing the same issue and looked everywhere for an answer without any resolution.

The trick that worked for me was to install older version of sphinx. v .9 instead of the latest beta.

Using the latest Thinking-Sphinx with this version of sphinx resolved the issue.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文