[
https://issues.apache.org/jira/browse/CASSANDRA-11067?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15133154#comment-15133154
]
Jon Haddad commented on CASSANDRA-11067:
----------------------------------------
I like to test this stuff by feel. This feels perfectly reasonable to me
(current behavior off the 11067 branch):
{code}
create table users ( id int primary key, first_name text, last_name text);
insert into users (id, first_name, last_name) VALUES (1, 'Jon', 'Haddad');
insert into users (id, first_name, last_name) values (2, 'Jonathan', 'Ellis');
create custom INDEX on users (first_name)
USING 'org.apache.cassandra.index.sasi.SASIIndex'
WITH OPTIONS = { 'analyzer_class':
'org.apache.cassandra.index.sasi.analyzer.NonTokenizingAnalyzer',
'case_sensitive':'false'};
cqlsh:test> select * from users where first_name = 'Jon';
id | first_name | last_name
----+------------+-----------
1 | Jon | Haddad
(1 rows)
cqlsh:test> select * from users where first_name LIKE 'Jon';
id | first_name | last_name
----+------------+-----------
1 | Jon | Haddad
(1 rows)
cqlsh:test> select * from users where first_name LIKE 'Jon%';
id | first_name | last_name
----+------------+-----------
1 | Jon | Haddad
2 | Jonathan | Ellis
{code}
Side note, trunk currently returns rows 1 & 2 for = queries, so the behavior
is, IMO, significantly improved in this branch.
> Improve SASI syntax
> -------------------
>
> Key: CASSANDRA-11067
> URL: https://issues.apache.org/jira/browse/CASSANDRA-11067
> Project: Cassandra
> Issue Type: Task
> Components: CQL
> Reporter: Jonathan Ellis
> Assignee: Pavel Yaskevich
> Fix For: 3.4
>
>
> I think everyone agrees that a LIKE operator would be ideal, but that's
> probably not in scope for an initial 3.4 release.
> Still, I'm uncomfortable with the initial approach of overloading = to mean
> "satisfies index expression." The problem is that it will be very difficult
> to back out of this behavior once people are using it.
> I propose adding a new operator in the interim instead. Call it MATCHES,
> maybe. With the exact same behavior that SASI currently exposes, just with a
> separate operator rather than being rolled into =.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)