The CLI index command
The Sitecore indexing plugin includes an index command. This command automates indexing operations. To install the indexing plugin, run the following code:
dotnet sitecore plugin add -n Sitecore.DevEx.Extensibility.Indexing --version 4.0.0This command is available from CLI 4.0 or later.
Usage
You can use the command as follows:
dotnet sitecore index [subcommand] [options]Subcommands
You can use the following subcommands:
|
Subcommand |
Description |
|---|---|
|
|
Provides the list of available indexes from the environment |
|
|
Populates the managed schema |
|
|
Rebuilds all the indexes |
|
|
Statistics of all the indexes |
All the subcommands require elevated permissions.
Options
You can use the following options with the list subcommand:
|
Option |
Required? |
Description |
|---|---|---|
|
|
Optional |
The Sitecore environment to use. Default: |
|
|
Optional |
Path to root |
|
|
Optional |
Report additional diagnostic and performance data. |
|
|
Optional |
Report additional diagnostic and performance data. |
|
|
Optional |
Help for the command. |
You can use the following options with the schema-populate subcommand:
|
Option |
Required? |
Description |
|---|---|---|
|
|
Optional |
Populate the schema for specified indexes. |
|
|
Optional |
The Sitecore environment to use. Default: |
|
|
Optional |
Path to root sitecore.config directory (default: cwd). |
|
|
Optional |
Report additional diagnostic and performance data. |
|
|
Optional |
Report additional diagnostic and performance data. |
|
|
Optional |
Help for the command. |
You can use the following options with the rebuild subcommand:
|
Option |
Required? |
Description |
|---|---|---|
|
|
Optional |
Rebuild the specified indexes. |
|
|
Optional |
The Sitecore environment to use. Default: |
|
|
Optional |
Path to root sitecore.config directory (default: cwd). |
|
|
Optional |
Report additional diagnostic and performance data. |
|
|
Optional |
Report additional diagnostic and performance data. |
|
|
Optional |
Help for the command. |
You can use the following options with the statistic subcommand:
|
Option |
Required? |
Description |
|---|---|---|
|
|
Optional |
The Sitecore environment to use. Default: |
|
|
Optional |
Path to root sitecore.config directory (default: cwd). |
|
|
Optional |
Report additional diagnostic and performance data. |
|
|
Optional |
Help for the command. |
Examples
The following are examples of the index command use:
|
Command |
Result |
|---|---|
|
|
RequestResponse |
|
|
RequestResponse |
|
|
RequestResponse |
|
|
RequestResponse |
|
|
RequestResponse |
|
|
RequestResponse |