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:
  • Element Details

    • value

      String value
      The 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 indexMode
      The 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