Details
-
Bug
-
Status: Resolved
-
Low
-
Resolution: Fixed
-
None
-
None
-
Low
Description
Not sure if this is the right place to ask, but it has been a couple days and I haven't been able to figure this out.
The current setup of my table is as such:
CREATE TABLE test.user_codes ( user_uuid text, code text, description text PRIMARY KEY (user_uuid, code) ); CREATE CUSTOM INDEX user_codes_code_idx ON test.user_codes (code) USING 'org.apache.cassandra.index.sasi.SASIIndex' WITH OPTIONS = {'analyzer_class': 'org.apache.cassandra.index.sasi.analyzer.NonTokenizingAnalyzer', 'case_sensitive': 'false', 'mode': 'CONTAINS', 'analyzed': 'true'}; CREATE CUSTOM INDEX user_codes_description_idx ON test.user_codes (description) USING 'org.apache.cassandra.index.sasi.SASIIndex' WITH OPTIONS = {'analyzer_class': 'org.apache.cassandra.index.sasi.analyzer.NonTokenizingAnalyzer', 'case_sensitive': 'false', 'mode': 'CONTAINS', 'analyzed': 'true'};
I can successfully make the following call:
SELECT * FROM user_codes WHERE user_uuid='xxxx' and description like 'Test%';
However, I can't make a similar call unless I allow filtering:
SELECT * FROM user_codes WHERE user_uuid='xxxx' and code like 'Test%';
I believe this is because the field `code` is a clustering key, but cannot figure out the proper way to set up the table such that the second call also works.