Riddle response error

229 views
Skip to first unread message

mohitnegi

unread,
Oct 21, 2011, 4:29:42 AM10/21/11
to thinkin...@googlegroups.com
Hi,

My query is like

Profile.search_for_ids :without_ids=>array_of_ids, :conditions=>condition_hash, :with=>query_hash, :limit=>10000

Now if the size of array array_of_ids increases by certain value, I am getting an error.

Riddle::ResponseError (searchd error (status: 1): invalid attribute set length 5298 (should be in 0..4096 range)):



Pat Allan

unread,
Oct 22, 2011, 2:47:22 AM10/22/11
to thinkin...@googlegroups.com
You can customise the maximum number of values allowed in a filter - try adding this setting to your config/sphinx.yml file for each environment:

development:
max_filter_values: 8192

Cheers

--
Pat

> --
> You received this message because you are subscribed to the Google Groups "Thinking Sphinx" group.
> To view this discussion on the web visit https://groups.google.com/d/msg/thinking-sphinx/-/iZPa37grnMQJ.
> To post to this group, send email to thinkin...@googlegroups.com.
> To unsubscribe from this group, send email to thinking-sphi...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/thinking-sphinx?hl=en.

mohitnegi

unread,
Nov 8, 2011, 6:08:55 AM11/8/11
to thinkin...@googlegroups.com
thanks for the reply, tht worked!!

A new problem i am facing, If including REXML in my controller



I Am including REXML in my application_controller so by default all the controller will have that.

Now if i am calling any method which calls a model in which i have defined my sphinx index, An error is thrown

undefined method `default_external' for REXML::Encoding:Module


Stack trace for the error

NoMethodError (undefined method `default_external' for REXML::Encoding:Module):
  riddle (1.4.0) lib/riddle.rb:15:in `encode'
  riddle (1.4.0) lib/riddle/client/response.rb:20:in `next'
  riddle (1.4.0) lib/riddle/client/response.rb:51:in `next_array'
  riddle (1.4.0) lib/riddle/client/response.rb:50:in `times'
  riddle (1.4.0) lib/riddle/client/response.rb:50:in `next_array'
  riddle (1.4.0) lib/riddle/client.rb:246:in `run'
  riddle (1.4.0) lib/riddle/client.rb:228:in `collect'
  riddle (1.4.0) lib/riddle/client.rb:228:in `run'
  riddle (1.4.0) lib/riddle/client.rb:338:in `query'
  /opt/ruby-enterprise-1.8.7-2011.03/lib/ruby/gems/1.8/gems/thinking-sphinx-1.4.7/lib/thinking_sphinx/search.rb:402:in `populate'
  /opt/ruby-enterprise-1.8.7-2011.03/lib/ruby/gems/1.8/gems/thinking-sphinx-1.4.7/lib/thinking_sphinx/search.rb:401:in `populate'
  /opt/ruby-enterprise-1.8.7-2011.03/lib/ruby/gems/1.8/gems/thinking-sphinx-1.4.7/lib/thinking_sphinx/search.rb:556:in `call'
  /opt/ruby-enterprise-1.8.7-2011.03/lib/ruby/gems/1.8/gems/thinking-sphinx-1.4.7/lib/thinking_sphinx/search.rb:556:in `retry_on_stale_index'
  /opt/ruby-enterprise-1.8.7-2011.03/lib/ruby/gems/1.8/gems/thinking-sphinx-1.4.7/lib/thinking_sphinx/search.rb:398:in `populate'
  /opt/ruby-enterprise-1.8.7-2011.03/lib/ruby/gems/1.8/gems/thinking-sphinx-1.4.7/lib/thinking_sphinx/search.rb:167:in `method_missing'
  app/models/shortlist_criteria_rules.rb:125:in `do_search'
  app/models/shortlist_criteria_rules.rb:30:in `do_search'
  app/controllers/shortlist_criteria_rules_controller.rb:56:in `index'


I guess something is overridden in riddle!!!! but not able to fix tht... any help !!!!!!

Pat Allan

unread,
Nov 8, 2011, 6:16:48 AM11/8/11
to thinkin...@googlegroups.com
Encoding is an existing class in Ruby 1.9, and because you're including REXML::Encoding (I'm guessing) into the root namespace (or maybe REXML does that anyway) is confusing the Riddle code that is checking whether it should handle special things for Ruby 1.9 or not.

If you don't include REXML, but just require it, does that fix things? Or when you say include, do you actually mean require?

--
Pat

> --
> You received this message because you are subscribed to the Google Groups "Thinking Sphinx" group.

> To view this discussion on the web visit https://groups.google.com/d/msg/thinking-sphinx/-/lYlDe28YEYwJ.

Reply all
Reply to author
Forward
0 new messages