Cosmos re-indexing takes longer than expected. Is there any way i can check if re-indexing is still happening for partitioned collection. Even though I made the index policy to none and kept back consistent, the query is throwing an error.
Asked
Active
Viewed 891 times
1 Answers
1
You can view the percentage progress by reading the x-ms-documentdb-collection-index-transformation-progress
header in GET collection. For example in .NET, you can run the following snippet:
// retrieve the container's details
ContainerResponse containerResponse = await client.GetContainer("database", "container")
.ReadContainerAsync(new ContainerRequestOptions { PopulateQuotaInfo = true });
// retrieve the index transformation progress from the result
long indexTransformationProgress = long.Parse(
containerResponse.Headers["x-ms-documentdb-collection-index-transformation-progress"]);
More details here: https://learn.microsoft.com/en-us/azure/cosmos-db/how-to-manage-indexing-policy#updating-indexing-policy

Aravind Krishna R.
- 7,885
- 27
- 37
-
I need to check the status when updating the policies via portal – pulkit arora Nov 04 '19 at 10:52