Hide
If you manually enter a large number in to the per_page parameter in the URL, you can run into a big problem.
We have a 5 million + index, and I did an Everything Search with a blank query and asked for 100 results per page. I then manually put in 5000000 as the per_page param and the server just hung.
We had to restart solr to get the index back.
I'm proposing the following change the solr_helper.rb -line17
- :per_page => args[:per_page],
+ :per_page => args[:per_page].to_i > 100 ? "100" : args[:per_page],
I think this is the proper way to go about it, and of course a test should accompany it.
Show
If you manually enter a large number in to the per_page parameter in the URL, you can run into a big problem.
We have a 5 million + index, and I did an Everything Search with a blank query and asked for 100 results per page. I then manually put in 5000000 as the per_page param and the server just hung.
We had to restart solr to get the index back.
I'm proposing the following change the solr_helper.rb -line17
- :per_page => args[:per_page],
+ :per_page => args[:per_page].to_i > 100 ? "100" : args[:per_page],
I think this is the proper way to go about it, and of course a test should accompany it.