The search-index command category includes a number of interactions with Algolia search indexes for Dynamic Content, and can be used to export and import indexes from an individual hub.
Run dc-cli search-index --help
to get a list of available commands.
Return to README.md for information on other command categories.
The following options are available for all search-index commands.
Option Name | Type | Description |
---|---|---|
--version | [boolean] | Show version number |
--clientId | [string] [required] |
Client ID for the source hub |
--clientSecret | [string] [required] |
Client secret for the source hub |
--hubId | [string] [required] |
Hub ID for the source hub |
--config | [string] [default: "~/.amplience/dc-cli-config.json"] |
Path to JSON config file |
--help | [boolean] | Show help |
--logFile | [string] [default: (generated-value)] |
Path to a log file to write to. |
Exports search indexes from the targeted Dynamic Content hub into the specified filesystem location.
dc-cli search-index export <dir>
Option Name | Type | Description |
---|---|---|
--id | [string] | The ID of a Search Index to be exported. If no --id option is given, all search indexes for the hub are exported. A single --id option may be given to export a single Search Index. Multiple --id options may be given to export multiple search indexes at the same time. |
-f --force |
[boolean] | Overwrite search indexes without asking. |
dc-cli search-index export ./myDirectory/indexes
Imports search indexes from the specified filesystem location to the targeted Dynamic Content hub.
dc-cli search-index import <dir>
Option Name | Type | Description |
---|---|---|
--webhooks | [boolean] | Import the index's webhooks as well as the index itself. The command will attempt to rewrite account names and staging environments in the webhook body to match the destination. |
dc-cli search-index import ./myDirectory/indexes
dc-cli search-index import ./myDirectory/indexes --webhooks