Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to read cassandra data with out case sensitive

Tags:

cassandra

I need to get the data from cassandra with out case sensitive. Please help me.

like image 510
user320343 Avatar asked Dec 29 '22 07:12

user320343


1 Answers

There is no case-sensitivity concept in Cassandra. All the data is stored as byte[], so it's not even a String.

You can make a custom comparator (see the API) which transforms byte[] to String and disregards case.

The other thing to do is just get the data and transform it on the client side.

Actually, your question is quite unclear as of what is your goal, so I can't give more details.

Update: Run a one-time job that fetches all records from the db and updates them, setting to lower-case. Then continue inserting everything with lowercase.

like image 104
Bozho Avatar answered Jan 04 '23 18:01

Bozho