algolia indices
Manage your Algolia indices.
algolia indices clear
algolia indices clear <index> [flags]
Clear the specified index.
Examples
1
2
3
# Clear the index named "MOVIES"
$ algolia index clear MOVIES
Flags
-
-y
,--confirm
-
skip confirmation prompt.
algolia indices config
algolia indices config [flags]
Manage your Algolia index config (settings, synonyms, rules).
algolia indices config export
algolia indices config export <index> [--scope <scope>...] [--directory] [flags]
Export an index configuration (settings, synonyms, rules) to a file.
Examples
1
2
3
4
5
6
7
8
9
# Export the config of the index 'MOVIES' to a .json in the current folder
$ algolia index config export MOVIES
# Export the synonyms and rules of the index 'MOVIES' to a .json in the current folder
$ algolia index config export MOVIES --scope synonyms,rules
# Export the config of the index 'MOVIES' to a .json into 'exports' folder
$ algolia index config export MOVIES --directory exports
Flags
-
-d
,--directory
-
Directory path of the output file (default: current folder).
-
-s
,--scope
-
Scope to export (default: all).
algolia indices config import
algolia indices config import <index> -F <file> --scope <scope>... [flags]
Import an index configuration (settings, synonyms, rules) from a file.
Examples
1
2
3
4
5
6
7
8
9
10
11
12
# 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).
algolia indices copy
algolia indices copy <source-index> <destination-index> [flags]
Make a copy of an index.
Examples
1
2
3
4
5
6
7
8
9
# Copy the records, settings, synonyms and rules from the "SERIES" index to the "MOVIES" index
$ algolia indices copy SERIES MOVIES
# Copy only the synonyms of the "SERIES" to the "MOVIES" index
$ algolia indices copy SERIES MOVIES --scope synonyms
# Copy the synonyms and rules of the index "SERIES" to the "MOVIES" index
$ algolia indices copy SERIES MOVIES --scope synonyms,rules
Flags
-
-y
,--confirm
-
skip confirmation prompt.
-
-s
,--scope
-
scope to copy (default: all).
-
-w
,--wait
-
wait for the operation to complete.
algolia indices delete
algolia indices delete <index> [flags]
Delete one or multiple indices.
Examples
1
2
3
4
5
6
7
8
9
10
11
12
# Delete the index named "MOVIES"
$ algolia indices delete MOVIES
# Delete the index named "MOVIES" and its replicas
$ algolia indices delete MOVIES --includeReplicas
# Delete the index named "MOVIES", skipping the confirmation prompt
$ algolia indices delete MOVIES -y
# Delete multiple indices
$ algolia indices delete MOVIES SERIES ANIMES
Flags
-
-y
,--confirm
-
skip confirmation prompt.
-
-r
,--includeReplicas
-
delete replica indices too.
algolia indices list
algolia indices list [flags]
List indices.
Examples
1
2
3
# List indices
$ algolia indices list
Output formatting flags
-
--allow-missing-template-keys
-
If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.
-
-o
,--output
-
Output format. One of: (json, jsonpath, jsonpath-as-json, jsonpath-file).
-
--template
-
Template string or path to template file to use when –output=jsonpath, –output=jsonpath-file.
algolia indices move
algolia indices move <source-index> <destination-index> [flags]
Move an index.
Examples
1
2
3
# Move the "TEST_MOVIES" index to "DEV_MOVIES"
$ algolia indices move TEST_MOVIES DEV_MOVIES
Flags
-
-y
,--confirm
-
skip confirmation prompt.
-
-w
,--wait
-
wait for the operation to complete.