You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Jordan West (JIRA)" <ji...@apache.org> on 2018/06/29 14:45:00 UTC

[jira] [Assigned] (CASSANDRA-13543) Cassandra SASI index gives unexpected number of results

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

Jordan West reassigned CASSANDRA-13543:
---------------------------------------

    Assignee: Jordan West  (was: Alex Petrov)

> Cassandra SASI index gives unexpected number of results
> -------------------------------------------------------
>
>                 Key: CASSANDRA-13543
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-13543
>             Project: Cassandra
>          Issue Type: Bug
>          Components: sasi
>            Reporter: Alexander Nabatchikov
>            Assignee: Jordan West
>            Priority: Major
>
> I've faced the issue with LIKE query to the column indexed by SASI index. Cassandra can return different number of rows when the data stays immutable.
> {code}
> CREATE TABLE idx_test
> (
> 	id int,
> 	str text,
> 	i int,
> 	PRIMARY KEY (id)
> );
> CREATE CUSTOM INDEX idx_test_idx ON idx_test (str)
> USING 'org.apache.cassandra.index.sasi.SASIIndex'
> WITH OPTIONS = { 
> 	'mode': 'CONTAINS',
> 	'analyzer_class': 'org.apache.cassandra.index.sasi.analyzer.StandardAnalyzer',
> 	'tokenization_enable_stemming': 'true',
> 	'tokenization_normalize_lowercase': 'true'
> };
> INSERT INTO idx_test (id, str, i) VALUES (1, 'a b c d', 10);
> INSERT INTO idx_test (id, str, i) VALUES (2, 'a b c d', 10);
> INSERT INTO idx_test (id, str, i) VALUES (3, 'a b c d', 10);
> INSERT INTO idx_test (id, str, i) VALUES (4, 'a b c d', 10);
> INSERT INTO idx_test (id, str, i) VALUES (5, 'a b c d', 10);
> INSERT INTO idx_test (id, str, i) VALUES (6, 'a b c d', 10);
> INSERT INTO idx_test (id, str, i) VALUES (7, 'a b c d', 10);
> INSERT INTO idx_test (id, str, i) VALUES (8, 'a b c d', 10);
> INSERT INTO idx_test (id, str, i) VALUES (9, 'a b c d', 10);
> INSERT INTO idx_test (id, str, i) VALUES (10, 'a b c d', 10);
> {code}
> Query:
> {code}
> SELECT * FROM idx_test WHERE str LIKE 'b' 
> AND i = 10
> ALLOW FILTERING;
> {code}
> This query mostly returns 0 rows, but sometimes 1 row appears in result row set as:
> {code}
> id |  i  |  str
> 10 |  10 |  a b c d
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org