You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You cannot define an SAI index based on the partition key when it’s comprised of only one column. If you attempt to create an SAI index in this case, SAI issues an error message.
Your looking for the "using sai"
All column date types except the following are supported for SAI indexes:
counter
non-frozen user-defined type (UDT)
CREATE INDEX lastname_sai_idx ON cycling.cyclist_semi_pro (lastname)
USING 'sai'
WITH OPTIONS = {'case_sensitive': 'false', 'normalize': 'true', 'ascii': 'true'};
CREATE INDEX age_sai_idx ON cycling.cyclist_semi_pro (age)
USING 'sai';
CREATE INDEX country_sai_idx ON cycling.cyclist_semi_pro (country)
USING 'sai'
WITH OPTIONS = {'case_sensitive': 'false', 'normalize': 'true', 'ascii': 'true'};
CREATE INDEX registration_sai_idx ON cycling.cyclist_semi_pro (registration)
USING 'sai';
Your looking for the "CREATE CUSTOM INDEX", "USING" and "SASIIndex" (just the word, not the fully qualified package)
CREATE CUSTOM INDEX ON sasi (first_name) USING 'org.apache.cassandra.index.sasi.SASIIndex'
... WITH OPTIONS = {
... 'analyzer_class':
... 'org.apache.cassandra.index.sasi.analyzer.NonTokenizingAnalyzer',
... 'case_sensitive': 'false'
... };
cqlsh:demo> CREATE CUSTOM INDEX ON sasi (last_name) USING 'org.apache.cassandra.index.sasi.SASIIndex'
... WITH OPTIONS = {'mode': 'CONTAINS'};
cqlsh:demo> CREATE CUSTOM INDEX ON sasi (age) USING 'org.apache.cassandra.index.sasi.SASIIndex';
cqlsh:demo> CREATE CUSTOM INDEX ON sasi (created_at) USING 'org.apache.cassandra.index.sasi.SASIIndex'
... WITH OPTIONS = {'mode': 'SPARSE'};
Vector Indexes
Cassandra 5.0+ only
This is an SAI index on a vector data type. You will need to see if the data type is a vector data type to detect
CREATE TABLE IF NOT EXISTS cycling.comments_vs (
record_id timeuuid,
id uuid,
commenter text,
comment text,
comment_vector VECTOR <FLOAT, 5>,
created_at timestamp,
PRIMARY KEY (id, created_at)
)
WITH CLUSTERING ORDER BY (created_at DESC);
CREATE INDEX IF NOT EXISTS ann_index
ON cycling.comments_vs(comment_vector) USING 'sai'
Collection Indexes
You need to check that the column the index is on is a collection data type
CREATE INDEX IF NOT EXISTS teams_idx
ON cycling.cyclist_career_teams (teams);
CREATE INDEX IF NOT EXISTS team_year_keys_idx
ON cycling.cyclist_teams ( KEYS (teams) );
CREATE INDEX IF NOT EXISTS blist_idx
ON cycling.birthday_list ( ENTRIES(blist) )
CREATE INDEX IF NOT EXISTS blist_values_idx
ON cycling.birthday_list ( VALUES(blist) )
CREATE INDEX IF NOT EXISTS rnumbers_idx
ON cycling.race_starts ( FULL(rnumbers) );
Indexes
Secondary Indexes (2i)
https://cassandra.apache.org/doc/5.0/cassandra/developing/cql/indexing/2i/2i-overview.html
Your looking for the "CREATE INDEX " without the
USING
sai`` and none of the othersStorage-attaached Indexes (SAI)
https://cassandra.apache.org/doc/5.0/cassandra/developing/cql/indexing/sai/sai-overview.html
You cannot define an SAI index based on the partition key when it’s comprised of only one column. If you attempt to create an SAI index in this case, SAI issues an error message.
Your looking for the "using
sai
"All column date types except the following are supported for SAI indexes:
SSTable Secondary Indexes (SASI Indexes)
https://cassandra.apache.org/doc/5.0/cassandra/developing/cql/SASI.html
Your looking for the "CREATE CUSTOM INDEX", "USING" and "SASIIndex" (just the word, not the fully qualified package)
Vector Indexes
Cassandra 5.0+ only
This is an SAI index on a vector data type. You will need to see if the data type is a vector data type to detect
Collection Indexes
You need to check that the column the index is on is a collection data type
Custom Indexes
https://cassandra.apache.org/doc/5.0/cassandra/reference/cql-commands/create-custom-index.html
Anything using
CREATE CUSTOM INDEX
which is not an SAI index or anything else. There are a few around egThe text was updated successfully, but these errors were encountered: