Thinking-Sphinx 不索引任何内容
我的环境:
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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不确定是否是拼写错误,但
define index
应该是define_index
Not sure if it's a typo, but
define index
should bedefine_index