Annotation Interface SASI
Identifies a secondary index using SASI indexing on a single column.
SASI uses significantly using fewer memory, disk, and CPU resources. It enables querying with PREFIX and CONTAINS on strings, similar to the SQL implementation of LIKE = "foo*" or LIKE = "*foo*".
@Table class Person { @SASI(analyzed = true, indexMode = CONTAINS) @StandardAnalyzed("en") String names; // allows LIKE queries @SASI int age // allows age >= … queries; }
SASI indexing can apply an analyzer that is applied during indexing. Annotation-based indexing supports
standard analyzer
and non-tokenizing analyzer
.
- Since:
- 2.0
- Author:
- Mark Paluch
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
static @interface
Apply non-tokenizing analyzer to SASI indexing.static enum
static @interface
Apply standard analyzer to SASI indexing. -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionThe name of the index.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:
- ""
-
indexMode
SASI.IndexMode indexModeThe 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:
- PREFIX
-