Cosmos DB Emulator and Java SDK: Indexing Policy Parity
25K reputation · 20 Oct 2021, 09:54 UTC
Establishing a repeatable development environment often involves containerizing the Azure Cosmos DB Emulator to mirror cloud configurations for Java-based application layers. While the Java SDK provides a consistent interface for both local and cloud endpoints, there is a known divergence in how indexing policies are processed and enforced between these environments.
When deploying a local emulator instance, the goal is to ensure that query performance and behavior remain predictable before promoting code to a cloud environment. However, the emulator may not strictly replicate the indexing behavior or the request unit (RU) calculations found in the deployed service, potentially masking indexing inefficiencies during local testing.
- Does the Cosmos DB Emulator fully support custom indexing policies defined via the Java SDK in a manner identical to the cloud service?
- What are the specific behavioral discrepancies regarding index propagation and query execution when moving from a containerized emulator to a live Azure instance?