思考Sphinx返回“错误的多查询计数0(必须在1..32范围内)”

时间:2011-05-17 00:55:38

标签: ruby-on-rails ruby-on-rails-3 sphinx thinking-sphinx

我正在尝试使用Sphinx(2.0.1 beta)和Thinking Sphinx 2.0.4(在Rails 3.0.3上)。到目前为止我有一个模型,我想添加到我的索引,索引工作。我也可以通过rake开始搜索并看到进程正在运行。

然而,当在Rails中尝试简单搜索(如User.search“name”)时,searchd会抱怨 “错误的多查询计数0(必须在1..32范围内)”

这是回溯:

from /vendor/bundle/ruby/1.8/gems/riddle-1.3.2/lib/riddle/client.rb:663:in `request'
from /vendor/bundle/ruby/1.8/gems/riddle-1.3.2/lib/riddle/client.rb:226:in `run'
from /vendor/bundle/ruby/1.8/gems/riddle-1.3.2/lib/riddle/client.rb:333:in `query'
from /vendor/bundle/ruby/1.8/gems/thinking-sphinx-2.0.4/lib/thinking_sphinx/search.rb:397:in `populate'
from /vendor/bundle/ruby/1.8/gems/activesupport-3.0.3/lib/active_support/notifications.rb:52:in `instrument'
from /vendor/bundle/ruby/1.8/gems/activesupport-3.0.3/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
from /vendor/bundle/ruby/1.8/gems/activesupport-3.0.3/lib/active_support/notifications.rb:52:in `instrument'
from /vendor/bundle/ruby/1.8/gems/thinking-sphinx-2.0.4/lib/thinking_sphinx/search.rb:499:in `log'
from /vendor/bundle/ruby/1.8/gems/thinking-sphinx-2.0.4/lib/thinking_sphinx/search.rb:507:in `log'
from /vendor/bundle/ruby/1.8/gems/thinking-sphinx-2.0.4/lib/thinking_sphinx/search.rb:396:in `populate'
from /vendor/bundle/ruby/1.8/gems/thinking-sphinx-2.0.4/lib/thinking_sphinx/search.rb:548:in `call'
from /vendor/bundle/ruby/1.8/gems/thinking-sphinx-2.0.4/lib/thinking_sphinx/search.rb:548:in `retry_on_stale_index'
from /vendor/bundle/ruby/1.8/gems/thinking-sphinx-2.0.4/lib/thinking_sphinx/search.rb:394:in `populate'
from /vendor/bundle/ruby/1.8/gems/thinking-sphinx-2.0.4/lib/thinking_sphinx/search.rb:176:in `method_missing'
from /usr/lib/ruby/1.8/irb.rb:310:in `output_value'
from /usr/lib/ruby/1.8/irb.rb:159:in `eval_input'
from /usr/lib/ruby/1.8/irb.rb:271:in `signal_status'
from /usr/lib/ruby/1.8/irb.rb:155:in `eval_input'
from /usr/lib/ruby/1.8/irb.rb:154:in `eval_input'
from /usr/lib/ruby/1.8/irb.rb:71:in `start'
from /usr/lib/ruby/1.8/irb.rb:70:in `catch'
from /usr/lib/ruby/1.8/irb.rb:70:in `start'
from /vendor/bundle/ruby/1.8/gems/railties-3.0.3/lib/rails/commands/console.rb:44:in `start'
from /vendor/bundle/ruby/1.8/gems/railties-3.0.3/lib/rails/commands/console.rb:8:in `start'
from /vendor/bundle/ruby/1.8/gems/railties-3.0.3/lib/rails/commands.rb:23
from script/rails:7:in `require'

1 个答案:

答案 0 :(得分:1)

啊,我刚刚回答谷歌集团的问题,但在这里,对于其他发现这个问题的人来说,

这是Riddle 1.3.2中的一个错误,它在边缘修复,但还没有新的gem发布。将谜语添加到Gemfilethinking-sphinx参考号上方):

gem 'riddle', :git => 'git://github.com/freelancing-god/riddle.git'