DESCRIBE INDEX
Shows the definition as an executable CQL statement of a specified index.
Synopsis
DESCRIBE INDEX [<keyspace_name>.]<index_name>
Syntax legend
Syntax conventions | Description |
---|---|
UPPERCASE |
Literal keyword. |
Lowercase |
Not literal. |
|
Variable value. Replace with a user-defined value. |
|
Optional.
Square brackets ( |
|
Group.
Parentheses ( |
|
Or.
A vertical bar ( |
|
Repeatable.
An ellipsis ( |
|
Single quotation ( |
|
Map collection.
Braces ( |
Set, list, map, or tuple.
Angle brackets ( |
|
|
End CQL statement.
A semicolon ( |
|
Separate the command line options from the command arguments with two hyphens ( |
|
Search CQL only: Single quotation marks ( |
|
Search CQL only: Identify the entity and literal value to overwrite the XML element in the schema and solrConfig files. |
- <keyspace_name>
-
Name of the keyspace
- <index_name>
-
Name of the index. If an index name was not specified when the index was created, the default name is the column name, underscore, followed by idx.
Examples
Create an index:
CREATE INDEX nationality_idx
ON cycling.cyclist_alt_stats (nationality);
Show the definition of the index:
DESC INDEX cycling.nationality_idx
Output:
CREATE INDEX nationality_idx
ON cycling.cyclist_alt_stats (nationality);