[
https://issues.apache.org/jira/browse/CASSANDRA-11067?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15131658#comment-15131658
]
Pavel Yaskevich commented on CASSANDRA-11067:
---------------------------------------------
Sure, here is one of the scenarios:
- I create an index on the column - first_name and I just set up 'mode' =
'PREFIX'
- all the queries I do need to be on the strict equality e.g. `SELECT * FROM
users WHERE first_name = 'Pavel' LIMIT 10;`
- But then I realize that what I really want is results to be case insensitive
still do a strict equality on the word itself, so I add
option to the index - set analyzer class to NonTokenizingAnalyzer and set
"case_sensitive" to "false"
- `SELECT * FROM users WHERE first_name = 'Pavel' LIMIT 10;` would still
produce results (probably more since it can match PaVel, pavel etc.) because
analyzer would process input text and down-case and match it internally with
already down-cased index although the original data is not touched at all.
But if we do query enforce LIKE it would mean that my `first_name =` is going
to start failing with something like following "InvalidRequest("Use LIKE
instead of EQ for column 'first_name'") instead, which doesn't really make much
sense to me as a user because I still want to do my strict equality queries.
> 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)