You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Alex Petrov (JIRA)" <ji...@apache.org> on 2016/11/17 14:51:58 UTC

[jira] [Resolved] (CASSANDRA-12746) Wrong search results if clustering column has SASI index

     [ https://issues.apache.org/jira/browse/CASSANDRA-12746?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alex Petrov resolved CASSANDRA-12746.
-------------------------------------
    Resolution: Duplicate

The same issue is described in [CASSANDRA-12674] (when searched items are in different partitions, because of AND/OR semantics, the record gets skipped).

> 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
>              Labels: sasi
>
> 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)