Index names
Index names are derived from the class names. To customize the index names, pass a string to theindex_name
option.
Ruby
Production and staging indices
To avoid changing your production index, you can append the current Rails environment to the index name with theper_environment
option.
This creates separate indices with names following the pattern MODEL_ENVIRONMENT
.
Ruby
_development
.
For more information, see API keys restrictions.
Basic relevance settings
To set a baseline for your index, define which attributes should be searchable and define a custom ranking.Ruby
Faceting and filtering
Add all attributes you want to use for filtering as facets.Ruby
Synonyms
You can define regular synonyms where all words are considered equivalent.Ruby
saveSynonyms
method on the API client.
Sync your settings with Algolia
By default, your settings will be synced with Algolia.Turn off automatic syncing
If you turn off automatic syncing, make sure to manually send updates to Algolia whenever you change your settings.Ruby
Apply all settings
To send settings updates for all indices, use theset_all_settings
rake command.
It sends updates to your primary indices, your replicas, and any indices you added with add_index
.
Consider adding this command to your deployment pipeline,
especially if you turned off automatic settings updates.