0

Cosmos DB FAQ says in Cassandra API section that Azure Cosmos DB provides automatic indexing of all attributes without any schema definition. https://learn.microsoft.com/en-us/azure/cosmos-db/faq#does-this-mean-i-dont-have-to-create-more-than-one-index-to-satisfy-the-queries-1

But when I try to add WHERE column1 = 'x' filter to my CQL query, I get exception from Datastax cassandra driver saying that data filtering is not supported. I tried to bypass client driver by supplying ALLOW FILTERING but this time got error from cosmos server saying this feature is not implemented.

So, if automatic indexing is implemented for Cosmos/Cassandra API, how can it be used?

Vadym Chekan
  • 4,977
  • 2
  • 31
  • 24
  • From what I have seen from the Cassandra API of CosmosDB is that while everything may be indexed underneath it all (as it's just an API on top of their database), if you choose the Cassandra API, you have to follow the Cassandra rules (i.e. querying the partition column); and yes, they don't support it 100% (as you're seeing allow filtering not supported). Their document api does a much better job of allowing queries with any column as a filter – Jim Wartnick May 07 '19 at 16:39
  • @JimWartnick I agree with you, but it looks like I can have cake but can not eat it. Why index columns if index can not be used by this specific API? Looks like waste of resources. – Vadym Chekan May 08 '19 at 19:34
  • No comment :) We started down that path and realized it's still pretty "green" with cassandra. – Jim Wartnick May 10 '19 at 16:50

0 Answers0