mirror of https://github.com/apache/cassandra
add index naming note to clarify
Author: Lorina Poland (polandll); Reviewed by Mick Semb Wever (mck) - no ticket
This commit is contained in:
parent
fa1afe8891
commit
4410419d14
|
|
@ -1,7 +1,9 @@
|
||||||
= Create SAI index
|
= Create SAI index
|
||||||
:description: Create SAI index for CQL table schema using `cqlsh`.
|
:description: Create SAI index for CQL table schema using `cqlsh`.
|
||||||
|
|
||||||
To create an SAI index, you must define the index name, table name, and column name for the column to be indexed.
|
To create an SAI index, you must define the index name, table name, and column name for the column to be indexed.
|
||||||
|
|
||||||
|
include::cassandra:partial$index-naming.adoc[]
|
||||||
|
|
||||||
To create a simple SAI index:
|
To create a simple SAI index:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,8 @@ Use xref:reference/cql-commands/create-custom-index.adoc[CREATE CUSTOM INDEX] co
|
||||||
include::cassandra:example$CQL/sai/cyclist_semi_pro_sai_indices.cql[tag=createQuickStartIndices]
|
include::cassandra:example$CQL/sai/cyclist_semi_pro_sai_indices.cql[tag=createQuickStartIndices]
|
||||||
----
|
----
|
||||||
|
|
||||||
|
include::cassandra:partial$index-naming.adoc[]
|
||||||
|
|
||||||
Let's take a look at the description of the table and its indexes:
|
Let's take a look at the description of the table and its indexes:
|
||||||
[tabs]
|
[tabs]
|
||||||
====
|
====
|
||||||
|
|
|
||||||
|
|
@ -54,6 +54,8 @@ index_name::
|
||||||
Optional identifier for index.
|
Optional identifier for index.
|
||||||
If no name is specified, the default used is `<table_name>\_<column_name>\_idx`.
|
If no name is specified, the default used is `<table_name>\_<column_name>\_idx`.
|
||||||
Enclose in quotes to use special characters or to preserve capitalization.
|
Enclose in quotes to use special characters or to preserve capitalization.
|
||||||
|
+
|
||||||
|
include::cassandra:partial$index-naming.adoc[]
|
||||||
|
|
||||||
column_name::
|
column_name::
|
||||||
The name of the table column on which the SAI index is being defined.
|
The name of the table column on which the SAI index is being defined.
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,7 @@ SAI returns `InvalidRequestException` if you try to define an index on a column
|
||||||
|
|
||||||
== Optional parameters
|
== Optional parameters
|
||||||
|
|
||||||
[cols="1,3"]
|
[cols="1,3"]
|
||||||
|===
|
|===
|
||||||
|
|
||||||
| Parameter | Description
|
| Parameter | Description
|
||||||
|
|
@ -75,6 +75,8 @@ SAI returns `InvalidRequestException` if you try to define an index on a column
|
||||||
Enclose in quotes to use special characters or preserve capitalization.
|
Enclose in quotes to use special characters or preserve capitalization.
|
||||||
If no name is specified, {product} names the index as `<table_name>\_<column_name>\_idx`.
|
If no name is specified, {product} names the index as `<table_name>\_<column_name>\_idx`.
|
||||||
|
|
||||||
|
include::cassandra:partial$index-naming.adoc[]
|
||||||
|
|
||||||
| keyspace_name
|
| keyspace_name
|
||||||
| Name of the keyspace that contains the table to index.
|
| Name of the keyspace that contains the table to index.
|
||||||
If no name is specified, the current keyspace is used.
|
If no name is specified, the current keyspace is used.
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
[WARNING]
|
||||||
|
====
|
||||||
|
Index names are unique per keyspace.
|
||||||
|
The index name must be a unique identifier for the index for each table within a keyspace.
|
||||||
|
This requirement is true for both vector and non-vector indexes.
|
||||||
|
====
|
||||||
Loading…
Reference in New Issue