Reputation: 2241
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 ?
Upvotes: 0
Views: 1862
Reputation: 5249
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).
Upvotes: 0
Reputation: 1523
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.
Upvotes: 1