Here's the error I'm hitting
NoMethodError: undefined method `group' for Sunspot::Search::StandardSearch:
I have sunspot version 1.2.1 and solr version 3.6. I also tested the grouping functionality with the solr version installed on my server by modifying the url and it works like a breeze.
However it breaks with the current sunspot version I have. I updated the sunspot gem to version 1.3.3 but it still breaks.
I'm pretty sure the syntax is correct because I followed the examples in the documentation:
https://github.com/sunspot/sunspot
I've looked around and this is the relevant answer i've found but doesn't help. Maybe i'm missing something?
These are the gems i've got installed:
gem 'sunspot_rails', '1.3.1' gem 'sunspot_solr'
EDIT
Here's the code that is breaking. It is same as the documentation. ':question' is a single value text field I want to group on.
search.group(:question).groups.each do |group|
puts group.value
end