cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Justin Hwang (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CASSANDRA-13674) SASIIndex and Clustering Key interaction
Date Wed, 05 Jul 2017 22:49:00 GMT

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

Justin Hwang updated CASSANDRA-13674:
-------------------------------------
    Component/s: sasi

> SASIIndex and Clustering Key interaction
> ----------------------------------------
>
>                 Key: CASSANDRA-13674
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-13674
>             Project: Cassandra
>          Issue Type: Bug
>          Components: sasi
>            Reporter: Justin Hwang
>            Priority: Minor
>
> Not sure if this is the right place to ask, but it has been a couple days and I haven't
been able to figure this out.
> The current setup of my table is as such:
> {code}
> CREATE TABLE test.user_codes (
>     user_uuid text,
>     code text,
>     description text
>     PRIMARY KEY (user_uuid, code)
> );
> CREATE CUSTOM INDEX user_codes_code_idx ON test.user_codes
> (code) USING 'org.apache.cassandra.index.sasi.SASIIndex' WITH OPTIONS =
> {'analyzer_class': 'org.apache.cassandra.index.sasi.analyzer.NonTokenizingAnalyzer',

> 'case_sensitive': 'false', 'mode': 'CONTAINS', 'analyzed': 'true'};
> CREATE CUSTOM INDEX user_codes_description_idx ON test.user_codes
> (description) USING 'org.apache.cassandra.index.sasi.SASIIndex' WITH OPTIONS =
> {'analyzer_class': 'org.apache.cassandra.index.sasi.analyzer.NonTokenizingAnalyzer',

> 'case_sensitive': 'false', 'mode': 'CONTAINS', 'analyzed': 'true'};
> {code}
> I can successfully make the following call: 
> {code}
> SELECT * FROM user_codes WHERE user_uuid='xxxx' and description like 'Test%';
> {code}
> However, I can't make a similar call unless I allow filtering:
> {code}
> SELECT * FROM user_codes WHERE user_uuid='xxxx' and code like 'Test%';
> {code}
> I believe this is because the field `code` is a clustering key, but cannot figure out
the proper way to set up the table such that the second call also works.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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


Mime
View raw message