cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Petrov (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (CASSANDRA-12746) Wrong search results if clustering column has SASI index
Date Thu, 17 Nov 2016 14:51:58 GMT

     [ 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)

Mime
View raw message