There is only one native index in open-source Cassandra, commonly referred to as secondary index. All indexes created with the CQL command CREATE INDEX
are secondary indexes.
Alternatively, the SSTable-attached secondary index (SASI) is a custom index and therefore needs to be explicitly created with the keyword CUSTOM
and the custom class SASIIndex
specified:
CREATE CUSTOM INDEX ... USING 'org.apache.cassandra.index.sasi.SASIIndex'
Note that SASI is considered experimental by the Cassandra community and is disabled by default as I've explained in this post -- https://community.datastax.com/questions/12403/. They are not recommended for use in production.
DataStax Enterprise which ships with production-certified distributions of Apache Cassandra has an advanced DSE Search feature that allows users to perform complex full-text Solr searches on CQL tables indexed with Lucene. The custom indexes are created with the class Cql3SolrSecondaryIndex
:
CREATE CUSTOM INDEX ... USING 'com.datastax.bdp.search.solr.Cql3SolrSecondaryIndex'
Astra DB, a fully-managed cloud-native Cassandra-as-a-service, includes the new Storage-Attached Indexing (SAI), a globally-distributed index for Cassandra. Indexes are created using the custom class StorageAttachedIndex
:
CREATE CUSTOM INDEX ... USING 'StorageAttachedIndex'
The SAI enhancement in not yet available in open-source Cassandra but has been donated by DataStax and is awaiting acceptance by the Cassandra project (see CEP-7, CASSANDRA-16052). Cheers!