pat / riddle

Ruby Client API for Sphinx
MIT License
135 stars 67 forks source link

fixes #84: allow group_by multiple fields #85

Closed jogaco closed 10 years ago

jogaco commented 10 years ago

Fixes #84: allow group_by multiple fields.

To recover grouped values:

search = MyClass.search :with => {:some_id => 85}, :group_by => "user_id, type";
search.context[:panes] << ThinkingSphinx::Panes::AttributesPane
search.each do |item|
  item.sphinx_attributes[‘count(*)’] # count
  item.sphinx_attributes[‘user_id’]
  item.sphinx_attributes[‘type’]
end
pat commented 10 years ago

Thanks :)

jogaco commented 10 years ago

What a difference a single 's' makes ;-) Thanks to you for your great support.