Search code examples
searchcassandracassandra-lucene-indexbigdatadatabase

How to Search In cassandra?


i wanna to search in cassandra database. After much research, I found

Stratio’s Cassandra Lucene Index

Is there another way to simple search on Cassandra? I mean a simple search query something like in Mysql

I've used this query but his conclusion was wrong

select * from users where uname > 'sa' allow filtering;


Solution

  • It seems to me that you'd want to perform a text search on a non PRIMARY KEY column.

    If that's the case, you could use a SSTable Attached Secondary Index (SASI) that would allow to exactly search as you wrote. Specifically, you'd need to create a CONTAINS index to perform inequality searches on text fields. You need Cassandra 3.4 and later.