NOT IS_DEFINED in Comsos Db

Brass Contributor

Hi Azure Cosmos Db team,

 

We need to use NOT IS_DEFINED to evaluate a property below

NOT IS_DEFINED(c.TestLocation['South Central US']

 

per the results analyzed NOT IS_DEFINED is not utilizing Index and is doing a full scan. There was an update from Cosmos Db Team that NOT IS_DEFINED can utilize index now. Below is the blog pertaining the same.

 

https://devblogs.microsoft.com/cosmosdb/april-query-improvements/

 

Can you please provide an alternative available if we cannot use NOT IS_DEFINED to evaluate the same property and to utilize index without a data model update?

 

With Regards,

Nitin Rahim

 

 

3 Replies

@mannu2050 can you help here? Thank you kindly!

NOT IS_DEFINED uses index, can you raise a support ticket and share your query. We will help you.
Hi Manish,

Thanks. We have added a field that stores the result of this evaluation which is indexed now. Testing with the same on Load. Will get back if the same is still high cost.

With Regards,
Nitin Rahim