Bringing together the Apache Cassandra experts from the community and DataStax.

Want to learn? Have a question? Want to share your expertise? You are in the right place!

Not sure where to begin? Getting Started

 

question

neerajk22 avatar image
neerajk22 asked Erick Ramirez edited

Is it possible to perform case-insensitive queries in CQL?

How to read cassandra data in case in-sensitive way : Case in-sensitive CQL query

Like in SQL there is way to query

select * from users where upper(first_name) = 'TEST';

So whats the alternative in CQL /Cassandra to read data in case in-sensitive way ?

cql
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

Erick Ramirez avatar image
Erick Ramirez answered Erick Ramirez edited

CQL does not natively support case-insensitive data retrieval. Cassandra is optimised for extremely fast data retrieval so filters (WHERE clause) must be an exact match.

For complex filtering, you need to index your data with software like Apache Solr or Elasticsearch so you can do more advanced free-form searches that can perform fuzzy matching. Cheers!

Share
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.