Ruby

Settings

Get settings - get_settings

You can retrieve settings:

settings = index.get_settings
puts settings.to_json

Set settings - set_settings

index.set_settings({"customRanking" => ["desc(followers)"]})

You can find the list of parameters you can set in the Settings Parameters section

Warning

Performance wise, it’s better to do a set_settings before pushing the data

Replica settings

You can forward all settings updates to the replicas of an index by using the forwardToReplicas option:

index.set_settings({"customRanking" => ["desc(followers)"]}, {"forwardToReplicas" => true})

Index settings parameters

Here is the list of parameters you can use with the set settings method (settings scope).

Parameters that can be overridden at search time also have the search scope.

Attributes

Ranking

Filtering / Faceting

Highlighting / Snippeting

Pagination

Typos

Query Strategy

Performance

Advanced