0
votes

Does Cassandra support like attribute on a string. I feel like based on partition system in cassandra, this type of query is not even supported in cassandra.

If I have model post

CREATE TABLE Post (

   title text PRIMARY KEY,

   description text,

);

How can I search title and description for a particular string pattern.?

what are options to implement this in cassandra.?

Do I need to pull all key strings using some text analytics API from title and description and store separately in a different table ?

2

2 Answers

1
votes

You're right, wildcard searches are not supported in Cassandra, given its key-value structure. A common solution people used is to use another product like Solr or Elastisearch to create indexes off of your Cassandra data.

0
votes

Cassandra 3.4 and later includes support for a new type of indexing that will allow you to do partial matching and full text search. Details can be found in the DataStax documentation: Using a SSTable Attached Secondary Index (SASI).