0
votes

Is there any way to disable the default secondary indexing in azure cosmosdb? My application does not require secondary indexing on addition of every extra field in the collection. Can I disable creation of secondary indexes?

What happens if I exclude all paths in Indexing Policy section with excludedPaths set to "/*" ? Will it remove indexing added on Partition and Row key as well?

1
Which Cosmos DB API are you using? It appears you are using Table API. If you are using a fixed collection, secondary indexes are not required and yes, you can also exclude secondary indexes: docs.microsoft.com/en-us/azure/cosmos-db/index-policyMike Ubezzi

1 Answers

0
votes

Yes set the indexing strategy to 'none' if you do not want to have any additional indexes other than the id. If you wish to have some you will need to exclude paths as you have indicated

https://docs.microsoft.com/en-us/azure/cosmos-db/index-policy