Thinking Sphinx returns "bad multi-query count 0 (must be in 1..32 range)"
I'm trying to use Sphinx (2.0.1 beta) with Thinking Sphinx 2.0.4 (on Rails 3.0.3). I have one model so far that I'd like to add to my index and the indexing has worked. I can also start searchd through rake and see the process running.
However, when trying a simple search in Rails (like User.search "name"), searchd complains about "bad multi-query count 0 (must be in 1..32 range)"
And here is the backtrace:
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 `star开发者_JAVA技巧t'
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'
Ah, I just answered on the Google Group, but here again, for anyone else who finds this question:
This is a bug in Riddle 1.3.2, which is fixed in edge, but there's no new gem release just yet. Add Riddle to your Gemfile
(above your thinking-sphinx
reference):
gem 'riddle', :git => 'git://github.com/freelancing-god/riddle.git'
精彩评论