Annotation Interface SaiIndexed
@Documented
@Retention(RUNTIME)
@Target({FIELD,METHOD,ANNOTATION_TYPE,TYPE_USE})
public @interface SaiIndexed
Identifies a Storage-Attached Indexing (SAI) index. You can create multiple secondary indexes on the same database
table, with each SAI index based on any column in the table. All column date types except the following are supported
for SAI indexes:
- counter
- non-frozen user-defined type (UDT)
The following columns of a Table
type can be annotated with SaiIndexed
:
- Scalar data types
- Frozen user-defined types
- Collection types
- Map type
- Vector types
Map types distinguish between entry, key or value-level indexing.
@Table class Person { Map<@SAIIndexed String, String> indexedKey; // allows CONTAINS KEY queries Map<String, @SAIIndexed String> indexedValue; // allows CONTAINS queries }
- Since:
- 4.5
- Author:
- Mark Paluch
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionboolean
When set to true, SAI converts alphabetic, numeric, and symbolic characters that are not in the Basic Latin Unicode block (the first 127 ASCII characters) to the ASCII equivalent, if one exists.boolean
Enable case-sensitive matching.boolean
When set to true, perform Unicode normalization on indexed strings.Vector search relies on computing the similarity or distance between vectors to identify relevant matches.The name of the index.
-
Element Details
-
value
String valueThe name of the index. If null or empty, then the index name will be generated by Cassandra and will be unknown unless column metadata is used to discover the generated index name.- Default:
- ""
-
caseSensitive
boolean caseSensitiveEnable case-sensitive matching.- Default:
- true
-
normalize
boolean normalizeWhen set to true, perform Unicode normalization on indexed strings. SAI supports Normalization Form C (NFC) Unicode. When set to true, SAI normalizes the different versions of a given Unicode character to a single version, retaining all the marks and symbols in the index. For example, SAI would change the characterÅ (U+212B)
toÅ (U+00C5)
.- Default:
- false
-
ascii
boolean asciiWhen set to true, SAI converts alphabetic, numeric, and symbolic characters that are not in the Basic Latin Unicode block (the first 127 ASCII characters) to the ASCII equivalent, if one exists. For example, this option changesà
toa
.- Default:
- false
-
similarityFunction
SimilarityFunction similarityFunctionVector search relies on computing the similarity or distance between vectors to identify relevant matches. The similarity function is used to compute the similarity between two vectors. When using SAI indexes with vector data types, then only the similarity function is used with index options.- Default:
- COSINE
-