Maxwell-Guo commented on code in PR #2433:
URL: https://github.com/apache/cassandra/pull/2433#discussion_r1244628761
##########
doc/cql3/CQL.textile:
##########
@@ -511,14 +511,24 @@ __Sample:__
bc(sample).
CREATE INDEX userIndex ON NerdMovies (user);
CREATE INDEX ON Mutants (abilityId);
-CREATE INDEX ON users (keys(favs));
+CREATE INDEX ON users (KEYS(favs));
+CREATE INDEX ON users (age) USING 'sai';
CREATE CUSTOM INDEX ON users (email) USING 'path.to.the.IndexClass';
CREATE CUSTOM INDEX ON users (email) USING 'path.to.the.IndexClass' WITH
OPTIONS = {'storage': '/mnt/ssd/indexes/'};
The @CREATE INDEX@ statement is used to create a new (automatic) secondary
index for a given (existing) column in a given table. A name for the index
itself can be specified before the @ON@ keyword, if desired. If data already
exists for the column, it will be indexed asynchronously. After the index is
created, new data for the column is indexed automatically at insertion time.
Attempting to create an already existing index will return an error unless the
@IF NOT EXISTS@ option is used. If it is used, the statement will be a no-op if
the index already exists.
+h4(#usingIndex). Index Types
+
+The @USING@ keyword optionally specifies an index type. There are two built-in
types:
+
+* legacy - (default) legacy secondary index, implemented as a hidden table
+* sai - "storage-attched" index, implemented via optimized
SSTable/Memtable-attached indexes
+
+To create a custom index, a fully qualified class name must be specified.
Review Comment:
thanks, I think this is enough.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]