ruby-on-railssolrsunspotsunspot-railssunspot-solr

faceting with solr sunspot gem - facets quantity limit


I use sunspot gem to work with solr. I have faceted search results.

 <% @search.facet(:street_name).each ... %>
    ==> here only first 100 facets are rendering but it has to be more ( my city is big enough =) )
 <% end %>

In my rendered HTML now I have only the first 100 results of my facets collection (street names) but I need all of them. Is this some kind of limit either on solr or sunspot side?

How can i change it to 1000 for example if limiting is something here I can't disable?

Thank you


Solution

  • thanks to google group

    here's the solution

    Model.solr_search do
    
      facet :street_name, limit: 1000 # or -1 to switch off the limit at all
    
    end