Details
-
Bug
-
Status: Resolved
-
Urgent
-
Resolution: Duplicate
-
None
-
None
-
Critical
Description
Cassandra 3.5.
Code snippet to reproduce the issue:
DROP keyspace if exists kmv; CREATE keyspace if not exists kmv WITH REPLICATION = { 'class' : 'SimpleStrategy', 'replication_factor':'1'} ; USE kmv; CREATE TABLE if not exists kmv (id int, c1 text, PRIMARY KEY(id,c1)); CREATE CUSTOM INDEX ON kmv.kmv ( c1 ) USING 'org.apache.cassandra.index.sasi.SASIIndex' WITH OPTIONS = { 'analyzed' : 'true', 'analyzer_class' : 'org.apache.cassandra.index.sasi.analyzer.NonTokenizingAnalyzer', 'case_sensitive' : 'false', 'mode' : 'CONTAINS' }; INSERT into kmv (id, c1) values (1, 'qweasd') ; INSERT into kmv (id, c1) values (1, 'uuu') ; INSERT into kmv (id, c1) values (2, 'qwe') ;
c1 is a clustering column with SASI index.
An attempt to add a restriction for partition key AND for the clustering column leads to incorrect results:
SELECT c1 from kmv.kmv where id=1 and c1 like '%qwe%';
Expected results:
qweasd
Actual results:
qweasd, uuu
Looks like a restriction for c1 was ignored.
Attachments
Issue Links
- duplicates
-
CASSANDRA-12674 [SASI] Confusing AND/OR semantics for StandardAnalyzer
- Open
- is duplicated by
-
CASSANDRA-12785 LIKE query with partition key restriction gives unexpected results
- Resolved