I started using SASI indexing and used the following setup,
CREATE TABLE employee (
id int,
lastname text,
firstname text,
dateofbirth date,
PRIMARY KEY (id, lastname, firstname)
) WITH CLUSTERING ORDER BY (lastname ASC, firstname ASC));
CREATE CUSTOM INDEX employee_firstname_idx ON employee (firstname) USING 'org.apache.cassandra.index.sasi.SASIIndex' WITH OPTIONS = {'mode': 'CONTAINS', 'analyzer_class': 'org.apache.cassandra.index.sasi.analyzer.StandardAnalyzer', 'case_sensitive': 'false'};
I perform the following query,
SELECT * FROM employee WHERE firstname like '%s';
As per my study, It seems the same as normal secondary indexing in Cassandra, Except providing the LIKE search,
1) Could somebody explain how it differs from normal secondary index in Cassandra?
2) What are the best configurations like mode, analyzer_class and case_sensitive - Any recommended documentation for this?