Method: Algolia::Search::SearchParamsObject#ranking
- Defined in:
- lib/algolia/models/search/search_params_object.rb
#ranking ⇒ Object
Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria). The tie-breaking algorithm sequentially applies each criterion in the order they’re specified. If you configure a replica index for [sorting by an attribute](www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute), you put the sorting attribute at the top of the list. Modifiers - ‘asc("ATTRIBUTE")`. Sort the index by the values of an attribute, in ascending order. - `desc("ATTRIBUTE")`. Sort the index by the values of an attribute, in descending order. Before you modify the default setting, test your changes in the dashboard, and by [A/B testing](www.algolia.com/doc/guides/ab-testing/what-is-ab-testing).
105 106 107 |
# File 'lib/algolia/models/search/search_params_object.rb', line 105 def ranking @ranking end |