Class: Sunspot::Query::Sort::RandomSort
- Defined in:
- lib/sunspot/query/sort.rb
Overview
A RandomSort uses Solr’s random field functionality to sort results (usually) randomly.
Instance Method Summary collapse
Methods inherited from Abstract
Constructor Details
This class inherits a constructor from Sunspot::Query::Sort::Abstract
Instance Method Details
#to_param ⇒ Object
79 80 81 |
# File 'lib/sunspot/query/sort.rb', line 79 def to_param "random_#{rand(1<<16)} #{direction_for_solr}" end |