You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The code for tuning the indexing policy may be easier to read if you use the fluent indexing policy builder:
Current code:
// Tune the indexing policy for write-heavy workloads by only including regularly queried paths.
// Be careful when using an opt-in policy as we are below. Excluding all and only including certain paths removes
// Cosmos DB's ability to proactively add new properties to the index.
telemetryContainerDefinition.IndexingPolicy.ExcludedPaths.Clear();
telemetryContainerDefinition.IndexingPolicy.ExcludedPaths.Add(new ExcludedPath { Path = "/*" }); // Exclude all paths.
telemetryContainerDefinition.IndexingPolicy.IncludedPaths.Clear();
telemetryContainerDefinition.IndexingPolicy.IncludedPaths.Add(new IncludedPath { Path = "/vin/?" });
telemetryContainerDefinition.IndexingPolicy.IncludedPaths.Add(new IncludedPath { Path = "/state/?" });
telemetryContainerDefinition.IndexingPolicy.IncludedPaths.Add(new IncludedPath { Path = "/partitionKey/?"
The code for tuning the indexing policy may be easier to read if you use the fluent indexing policy builder:
Current code:
// Tune the indexing policy for write-heavy workloads by only including regularly queried paths.
// Be careful when using an opt-in policy as we are below. Excluding all and only including certain paths removes
// Cosmos DB's ability to proactively add new properties to the index.
telemetryContainerDefinition.IndexingPolicy.ExcludedPaths.Clear();
telemetryContainerDefinition.IndexingPolicy.ExcludedPaths.Add(new ExcludedPath { Path = "/*" }); // Exclude all paths.
telemetryContainerDefinition.IndexingPolicy.IncludedPaths.Clear();
telemetryContainerDefinition.IndexingPolicy.IncludedPaths.Add(new IncludedPath { Path = "/vin/?" });
telemetryContainerDefinition.IndexingPolicy.IncludedPaths.Add(new IncludedPath { Path = "/state/?" });
telemetryContainerDefinition.IndexingPolicy.IncludedPaths.Add(new IncludedPath { Path = "/partitionKey/?"
See example: https://gist.github.com/deborahc/57b996e5f1dd82fcc1aacf00621c2459
The text was updated successfully, but these errors were encountered: