DataStax Academy FAQ

DataStax Academy migrated to a new learning management system (LMS) in July 2020. We are also moving to a new Cassandra Certification process so there are changes to exam bookings, voucher system and issuing of certificates.

Check out the Academy FAQ pages for answers to your questions:


question

mailforlalit avatar image
mailforlalit asked ·

How do I model tables for multi-criteria search functionality in the application?

Using the Search Feature scenario, I would like to get opinion to design/implement search functionality.

For Example :

An Employee data stored in the table.. I would like to search employee for one or many combination of search criteria of attributes of Employees.

  • Name
  • Department
  • Joining Date
  • Active Employee

and many more other criteria.

On screen I can give values for either of these or all criteria.

How should we proceed to implement this scenario specially table design. I am not sure if we need to create tables for all possible combination of these criteria ( keeping as partition and cluster keys).

cassandra
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

Erick Ramirez avatar image
Erick Ramirez answered ·

The current version of Apache Cassandra does not provide this functionality unless you index multiple columns in a table but there can be performance implications to doing that and won't necessarily achieve the outcome you're after.

It sounds like what you really need is a free-form text search functionality with Apache Solr. Solr can do free-form searches on your data using Lucene indexes.

You can integrate Solr/Lucene with Cassandra yourself. But if you're looking for an out-of-the-box solution, DataStax Enterprise includes DSE Search that allows you to do ad-hoc searches backed by Solr and Lucene. Cheers!

Share
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.