1
votes

At blog I see below statement

Secondary Indexes

Secondary indexes are a first-class construct in MongoDB. This makes it easy to index any property of an object stored in MongoDB even if it is nested. This makes it really easy to query based on these secondary indexes Cassandra has only cursory support for secondary indexes. Secondary indexes are also limited to single columns and equality comparisons. If you are mostly going to be querying by the primary key then Cassandra will work well for you.

My question is can't Cassandra create more than one secondary index on separate columns ?

Also can't we execute operation like or full text search on Cassandra as it says secondary index are good for only equality comparison

Update :- What is the difference between cassandra secondary index and Mongo secondary index ?

1

1 Answers

1
votes

Cassandra create more than one secondary index on separate columns ?

Yes it can. Multiple Indexes are possible but ALLOW FILTERING must be used to query, which affects the performance. Secondary index in cassandra are not like the one in RDBMS and proper analysis should be done before using it.

can't we execute operation like or full text search on Cassandra as it says secondary index are good for only equality comparison

Normal Secondary index does not support like operation. Though latest cassandra version (3.x) has support for SASI Index which has support for like or CONTAINS operation.

Custom SASI Index