Export and Import Indices and Settings
On this page
- 1. Export records from your indices
- 2. Import records
- 3. What’s included in the index configuration
- 4. Export index configuration from the Algolia dashboard
- 5. Export index configuration using the API
- 6. Import index configuration from the Algolia dashboard
- 7. Import index configuration using the API
You can export the configuration of one index and import it in another index. This can be useful if you want to:
- Back up your index configuration
- Track changes to the index configuration, for example, with a version control system
- Apply the same configuration to multiple indices, for example, moving between staging and production environments, or when you have different indices for different geographical regions
If you want to copy an index’s settings to another index, see Copy indices.
Export records from your indices
You can export the records in your indices using one of these methods:
- Use the
algolia objects browse
command with the Algolia CLI - Use the
browse
method with an API client
You can’t export records with the Algolia dashboard.
Import records
If you want to upload records to Algolia, see these topics for more information:
What’s included in the index configuration
Your index configuration contains values for:
- Settings, such as searchable attributes, custom ranking, typo tolerance, and stop words
- Synonyms
- Rules
Export index configuration from the Algolia dashboard
To export the configuration of an index from the Algolia dashboard as a JSON file:
- Go to the Algolia dashboard and select your index from the Index menu.
-
Select Manage index > Export Configuration.
-
Choose what you want to export: Settings, Synonyms, or Rules.
- Click Export Configuration to download a JSON file with the index configuration.
Export index configuration using the API
You can get the index settings, Rules, and synonyms from the API
and export the settings in any format you like.
To read settings, Rules, and synonyms, you need an API key with settings
permissions.
Using the Algolia CLI, you can save the output of the following commands directly,
or transform the data into any format you like.
You can obtain the configuration of an index with the following methods:
Algolia CLI | API clients | |
---|---|---|
Settings | algolia settings get |
getSettings |
Rules | algolia rules browse |
exportRules |
Synonyms | algolia synonyms browse |
exportSynonyms |
Import index configuration from the Algolia dashboard
To import the configuration of an index from a JSON file in the Algolia dashboard:
- Go to the Algolia dashboard and select your index from the Index menu.
-
Select Manage index > Import Configuration.
-
Select the JSON file you want to import. Choose what you want to import: Settings, Synonyms, or Rules.
-
Type
IMPORT
to confirm and click Import Configuration.Importing settings replaces all existing index settings with the imported ones. Synonyms and Rules are replaced if the synonym or Rule already exists. Otherwise, new synonyms or Rules are added.
Import index configuration using the API
After importing a file with the index configuration,
you can use these methods to change the configuration.
You need an API key with editSettings
permissions.
Algolia CLI | API clients | |
---|---|---|
Update settings | algolia settings import |
setSettings |
Add Rules | algolia rules import |
saveRule |
Add Synonyms | algolia synonyms import |
saveSynonym |