Thinking-Sphinx 不索引任何内容

发布于 2024-09-17 23:47:24 字数 2226 浏览 8 评论 0原文

我的环境:

Mac OSX 10.6 Snow Leopard
Ruby 1.9.2p0
Rails 3.0.0
thinking-sphinx (2.0.0.rc1)
Sphinx 0.9.9-release (r2117)

到目前为止,我还没有真正能够让任何东西发挥作用。

pma:log pma$ rake thinking_sphinx:index
(in /Users/pma/Sites/urban-ent)
DEPRECATION WARNING: Rake tasks in /Users/pma/Sites/urban-ent/vendor/plugins/yaml_db/tasks/yaml_db_tasks.rake are deprecated. Use lib/tasks instead. (called from <top (required)> at /Users/pma/Sites/urban-ent/Rakefile:7)
Generating Configuration to /Users/pma/Sites/urban-ent/config/development.sphinx.conf
Sphinx 0.9.9-release (r2117)
Copyright (c) 2001-2009, Andrew Aksyonoff

using config file '/Users/pma/Sites/urban-ent/config/development.sphinx.conf'...
FATAL: no indexes found in config file '/Users/pma/Sites/urban-ent/config/development.sphinx.conf'

pma:urban-ent pma$ rake thinking_sphinx:rebuild
(in /Users/pma/Sites/urban-ent)
DEPRECATION WARNING: Rake tasks in /Users/pma/Sites/urban-ent/vendor/plugins/yaml_db/tasks/yaml_db_tasks.rake are deprecated. Use lib/tasks instead. (called from <top (required)> at /Users/pma/Sites/urban-ent/Rakefile:7)
Generating Configuration to /Users/pma/Sites/urban-ent/config/development.sphinx.conf
Sphinx 0.9.9-release (r2117)
Copyright (c) 2001-2009, Andrew Aksyonoff

using config file '/Users/pma/Sites/urban-ent/config/development.sphinx.conf'...
FATAL: no indexes found in config file '/Users/pma/Sites/urban-ent/config/development.sphinx.conf'
Failed to start searchd daemon. Check /Users/pma/Sites/urban-ent/log/searchd.log.
Failed to start searchd daemon. Check /Users/pma/Sites/urban-ent/log/searchd.log

searchd.log 为空。没有任何内容被写入其中。

pma:log pma$ ls -l
total 3312
-rw-rw-rw-@ 1 pma  staff  1694487 Sep  8 15:17 development.log
-rw-rw-rw-  1 pma  staff        0 Sep  7 14:57 production.log
-rw-rw-rw-  1 pma  staff        0 Sep  7 17:39 searchd.log
-rw-rw-rw-  1 pma  staff        0 Sep  7 14:57 server.log
-rw-rw-rw-  1 pma  staff        0 Sep  7 14:58 test.log
pma:log pma$ 

我确实在 app/models/instruction.rb 的模型中定义了索引,

define index do
  indexes title
  indexes description
end

但它们似乎完全被忽略了。

有人解决吗?

My environment:

Mac OSX 10.6 Snow Leopard
Ruby 1.9.2p0
Rails 3.0.0
thinking-sphinx (2.0.0.rc1)
Sphinx 0.9.9-release (r2117)

So far I haven't really been able to get anything to work.

pma:log pma$ rake thinking_sphinx:index
(in /Users/pma/Sites/urban-ent)
DEPRECATION WARNING: Rake tasks in /Users/pma/Sites/urban-ent/vendor/plugins/yaml_db/tasks/yaml_db_tasks.rake are deprecated. Use lib/tasks instead. (called from <top (required)> at /Users/pma/Sites/urban-ent/Rakefile:7)
Generating Configuration to /Users/pma/Sites/urban-ent/config/development.sphinx.conf
Sphinx 0.9.9-release (r2117)
Copyright (c) 2001-2009, Andrew Aksyonoff

using config file '/Users/pma/Sites/urban-ent/config/development.sphinx.conf'...
FATAL: no indexes found in config file '/Users/pma/Sites/urban-ent/config/development.sphinx.conf'

pma:urban-ent pma$ rake thinking_sphinx:rebuild
(in /Users/pma/Sites/urban-ent)
DEPRECATION WARNING: Rake tasks in /Users/pma/Sites/urban-ent/vendor/plugins/yaml_db/tasks/yaml_db_tasks.rake are deprecated. Use lib/tasks instead. (called from <top (required)> at /Users/pma/Sites/urban-ent/Rakefile:7)
Generating Configuration to /Users/pma/Sites/urban-ent/config/development.sphinx.conf
Sphinx 0.9.9-release (r2117)
Copyright (c) 2001-2009, Andrew Aksyonoff

using config file '/Users/pma/Sites/urban-ent/config/development.sphinx.conf'...
FATAL: no indexes found in config file '/Users/pma/Sites/urban-ent/config/development.sphinx.conf'
Failed to start searchd daemon. Check /Users/pma/Sites/urban-ent/log/searchd.log.
Failed to start searchd daemon. Check /Users/pma/Sites/urban-ent/log/searchd.log

The searchd.log is empty. Nothing gets written to it.

pma:log pma$ ls -l
total 3312
-rw-rw-rw-@ 1 pma  staff  1694487 Sep  8 15:17 development.log
-rw-rw-rw-  1 pma  staff        0 Sep  7 14:57 production.log
-rw-rw-rw-  1 pma  staff        0 Sep  7 17:39 searchd.log
-rw-rw-rw-  1 pma  staff        0 Sep  7 14:57 server.log
-rw-rw-rw-  1 pma  staff        0 Sep  7 14:58 test.log
pma:log pma$ 

I do have indexes defined in a model at app/models/instruction.rb

define index do
  indexes title
  indexes description
end

They seem to be totally ignored though.

Solutions anyone?

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

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

发布评论

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

评论(1

2024-09-24 23:47:24

不确定是否是拼写错误,但 define index 应该是 define_index

Not sure if it's a typo, but define index should be define_index

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