Skip to main content
Usage
algolia indices config import <index> -F <file> --scope <scope>... [flags]

Examples

Import the config from a .json file into ‘PROD_MOVIES’ index:
algolia index config import PROD_MOVIES -F export-STAGING_MOVIES-APP_ID-1666792448.json
Import only the synonyms and settings from a .json file to the ‘PROD_MOVIES’ index:
algolia index config import PROD_MOVIES -F export-STAGING_MOVIES-APP_ID-1666792448.json --scope synonyms, settings
Import only the synonyms from a .json file to the ‘PROD_MOVIES’ index and clear all existing ones:
algolia index config import PROD_MOVIES -F export-STAGING_MOVIES-APP_ID-1666792448.json --scope synonyms --clear-existing-synonyms
Import only the rules from a .json file to the ‘PROD_MOVIES’ index and clear all existing ones:
algolia index config import PROD_MOVIES -F export-STAGING_MOVIES-APP_ID-1666792448.json --scope rules --clear-existing-rules

Flags

-r, --clear-existing-rules
Clear ALL existing rules of the index before import
-o, --clear-existing-synonyms
Clear ALL existing synonyms of the index before import
-y, --confirm
Skip confirmation prompt
-F, --file
Directory path of the JSON config file
-l, --forward-rules-to-replicas
Forward imported rules to replicas
-t, --forward-settings-to-replicas
Forward imported settings to replicas
-m, --forward-synonyms-to-replicas
Forward imported synonyms to replicas
-s, --scope
Scope to import (default: none)
I