Mikhail Krupitskiy created CASSANDRA-12746:
----------------------------------------------
Summary: Wrong search results if clustering column has SASI index
Key: CASSANDRA-12746
URL: https://issues.apache.org/jira/browse/CASSANDRA-12746
Project: Cassandra
Issue Type: Bug
Reporter: Mikhail Krupitskiy
Priority: Critical
Cassandra 3.5.
Code snippet to reproduce the issue:
{code}
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') ;
{code}
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:
{code}
SELECT c1 from kmv.kmv where id=1 and c1 like '%qwe%';
{code}
Expected results:
qweasd
Actual results:
qweasd, *uuu*
Looks like a restriction for c1 was ignored.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)