search by character ordered by value Cassandra:
I am currently in the process of mastering cassandra with a first project. This one is a social network. I am working on the search bar to find users in the network. I'm looking for the best db organization as well as the best cql command to retrieve a list of 5 users starting from a score (float by descending order) as well as the first character of the pseudo of this one that the user entered. Here is my idea to organize the cassandra table
CREATE TABLE user_classement (id int, user_name set<text>, score float,PRIMARY KEY(id, score))WITH CLUSTERING ORDER BY (score DESC) ;
create index on user_classement (user_name);
Here is my idea to organize the cassandra table
INSERT INTO user_classement(id, user_name, score) VALUES (678, {'j', 'je', 'jes', 'jesv', 'jesve'}, 89,6);
The problem is that this organisation is not at all optimised and does not work with a contains in the cql command