Where do I define Sunspot/solr configuration?
I see in the sunspot documentation that to define the default number of results I should use:
Sunspot.config.pagination.default_per_page = 12
I have tried adding that line to application.rb but it do开发者_StackOverflow社区esn't work. Where exactly should I define this setting?
Just put it in an initializer e.g. config/initializers/sunspot.rb
and it will work fine!
精彩评论