mongocli atlas cluster search index describe
The search index describe
command retrieves one Atlas Search index for a specified cluster. You
can also retrieve a single Atlas Search index through the Atlas UI or the
API.
Syntax
mongocli atlas cluster search|fts index describe <index-id> --clusterName <cluster-name> [ --output|-o <output-format> ] [ --profile|-P <profile-name> ] [ --projectId <project-ID> ]
Options
Option | Type | Description | Required? |
---|---|---|---|
<index-id> | string | Unique identifier of the Atlas Search index to describe. | yes |
--clusterName | string | Name of the cluster. | yes |
--output , -o | string | Command output format. Valid values are:
If omitted, the command returns output in the default format. | no |
--profile , -P | string | Name of the profile where the public and private keys for the project
are set. If omitted, uses the default profile. To learn more about
creating a profile, see Configure the MongoDB CLI. | no |
--projectId | string | Unique identifier of the project. If omitted, uses the project ID in the profile or environment variable. | no |
Output
The command prints the following fields in the specified format to the terminal if the command succeeds. If the command prints an error, see Troubleshooting for recommended solutions.
Field | Type | Description |
---|---|---|
analyzer | string | Name of the analyzer to use when creating the index. Value can be one of the following: |
collectionName | string | Name of the collection. |
database | string | Name of the database that contains the collection. |
indexID | string | Unique identifier of the Atlas Search index. |
mappings | document | Static or dynamic field mappings for the Atlas Search index. |
mappings.dynamic | string | Whether the Atlas Search index uses dynamic field mappings. Value can be one of the following:
|
mappings.fields | document or array of documents | List of indexed fields. |
mappings.fields.[n].type | string | Data type of the indexed field. |
name | string | Name of the index. |
searchAnalyzer | string | Name of the analyzer to use when searching the indexed field. Value can be one of the following: |
Example
The following example uses the mongocli atlas cluster search index describe
command to retrieve an Atlas Search index on an Atlas cluster named
myTestCluster
.
mongocli atlas cluster search index describe 5f1f40842f2ac35f49190c20 --clusterName myTestCluster --output json -P egAtlasProfile
The previous command prints the following fields in the specified format to the terminal. To learn more about these fields, see Output.
{ "analyzer": "lucene.standard", "collectionName": "movies", "database": "sample_mflix", "indexID": "5f1f40842f2ac35f49190c20", "mappings": { "dynamic": true }, "name": "dynamic", "searchAnalyzer": "lucene.standard" }