Azure Cosmos DB

Have feedback for Azure Cosmos DB product? Submit your idea here or upvote other ideas. All feedback is monitored and reviewed by the Azure Cosmos DB team. 

This site is for feature suggestions only. For technical questions or issues, please submit them to StackOverflow,where we and the community can better help you.

Please use the following categories when submitting your idea.

SQL API: Query language features, syntax using SQL API, indexing, any other core features in Azure Cosmos DB.

Gremlin API: Graph features and capabilities using Gremlin API.

Cassandra API: Features and capabilities using Cassandra API.

MongoDB API: Features and capabilities using MongoDB API.

Table API: Features and capabilities using Table API.

Etcd API: Features related to using etcd as a configuration store for Kubernetes.

Azure Synapse Link: Features related to Azure Cosmos DBanalytical store and Azure Synapse Analytics run-time support

Built-in Notebooks: Features related to built-in Notebooks in Azure Cosmos DB.

SDK: Features related to Azure Cosmos DB SDKs for SQL API.

Change Feed: Features related to Change Feed.

Management: All management features, backup/restore,monitoring, ARM, PowerShell and CLI.

Portal: All features for Azure Portal and Cosmos DB Explorer.

Emulator: Features related to the Azure Cosmos Emulator.

Other: Features not related to any other category.

Security:
Authentication, authorization,permissions and encryption features.

Monitoring:
Metrics, monitoring, alerts,and diagnostics features.

Server-side: Stored procedures, Triggers,and User-Defined Functions.
  • Hot ideas
  • Top ideas
  • New ideas
  • My feedback
  1. Unique index in nested documents or arrays

    Right now I'm not able to create unique indexes in nested documents.
    Using MongoDB Driver.

    Error:
    {"ok": 0.0, "errmsg": "Unique index does not currently support nested documents or arrays.", "code": 115, "codeName": "CommandNotSupported"};

    12 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    1 comment  ·  MongoDB API  ·  Flag idea as inappropriate…  ·  Admin →
  2. Ability to refresh(copy) Cosmos DB from one instance to another

    Development teams often need data to be copied from one database instance to another e.g. copy all the data from a production database instance to a development/stage instance every other month or so. The current configuration does not allow an easy way to do this. It would be nice if you extend the functionality of the Azure Data Migration tool to take cosmos DB as source and another CosmosDB as a target to allow this. Though this can be achieved via the workaround of using mongodump which fails for bigger data loads due to the RU limits on cosmos Collections.

    3 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  MongoDB API  ·  Flag idea as inappropriate…  ·  Admin →
  3. Return random for $sample

    $sample should return an actual random sample.

    Right now it returns the top/first N items. This is preventing us from porting code over the Cosmos DB.

    1 vote
    Vote
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  MongoDB API  ·  Flag idea as inappropriate…  ·  Admin →
  4. slice projection not working mongodb

    User.findById({ _id: req.params.id }).slice('blacklistGroup', [0, 2]).then((res) => { outputs slice must be an integer error. More details here https://stackoverflow.com/q/61290693/2683814

    1 vote
    Vote
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    under review  ·  0 comments  ·  MongoDB API  ·  Flag idea as inappropriate…  ·  Admin →
  5. Support for transactions via Mongo 4.0 API

    Mongo 4.0 incl transactions has been released: https://www.mongodb.com/transactions.
    CosmosDB should support Mongo 4.0 API (including transactions)

    382 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    17 comments  ·  MongoDB API  ·  Flag idea as inappropriate…  ·  Admin →
  6. Cursor for a non-existent collection

    My partner is developing their service based FIWARE as OSS on Azure . They usually use mongoDB on on-premise. I would appreciate it if you could fix this difference between MongoDB and Azure CosmosDB mongodb API.
    This is their feedback as below :


    • In FIWARE Orion, there is a case to perform a find for a collection that does not exist, for example, for automatic collection generation, but in this case, it receives unexpected search results and fail.

    • [Difference between mongoDB and Azure CosmosDB mongo API]

      • [mongodb] The cursor found in a non-existent collection is empty, and false is returned…
    1 vote
    Vote
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  MongoDB API  ·  Flag idea as inappropriate…  ·  Admin →
  7. Support Users and Roles management

    It should be possible to use the create/drop/getRole and create/drop/getUser for MongoDB API!

    5 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  MongoDB API  ·  Flag idea as inappropriate…  ·  Admin →
  8. MongoDB Query projecting optional fields

    Cosmos Mongo doesn't support the projection of optional nested fields.

    Suppose i have two documents like this
    {
    "id": 100,
    "name": "bruceLee",
    "specialSkills": {
    "combat": "hand2hand",
    "extendedLife": true
    },
    "level": 2
    }

    {
    "id": 101,
    "name": "john",
    "level": 0
    }

    In cosmos the below query is failing whereas in mongo it works fine. This is very useful for the complex json.

    db.getCollection('players').find({},{"id": 1,
    "name": 1,
    "level": 1,
    "specialSkills.combat": 1 })

    Because some don't have specialSkills I can't use this query.

    3 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  MongoDB API  ·  Flag idea as inappropriate…  ·  Admin →
  9. Align the handling of Unique Sparse Indexes with MongoDB

    Currently, the Azure Cosmos DB Mongo API does not support sparse unique keys (https://docs.microsoft.com/en-us/azure/cosmos-db/unique-keys#define-a-unique-key). This is at odds with the current implementation of MongoDB which does support Sparse indexes with a unique constraint (https://docs.mongodb.com/manual/core/index-sparse/).

    Meteor, a popular framework using MongoDB, use sparse indexes with unique keys in its fundamental user management (https://github.com/meteor/meteor/blob/c5b51b0fc2a8cef498b9390ebcb4925e02de83e8/packages/accounts-base/accounts_server.js#L1562).

    The current implementation of MongoDB allows you to create documents (such as a user document) without a field that has a unique sparse index (such as username). This is not possible with the Azure Cosmos DB Mongo API, forcing you to populate…

    6 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  MongoDB API  ·  Flag idea as inappropriate…  ·  Admin →
  10. Azure Cosmos DB doesn't support basic sort

    Mongo supports case insensitive sort through collation usage.
    When I tested on mongo locally it worked, when deployed on azure platform it just started throwing error:
    "MongoError: server bmcldocdb.documents.azure.com:10255 does not support collation"

    64 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    2 comments  ·  MongoDB API  ·  Flag idea as inappropriate…  ·  Admin →
  11. Allow creating Index with weights

    It would be nice to have index capability with weights in Azure Cosmos Db through Mongo driver. Currently it says this feature isnt available. Something like how we do in MongoDB

    db.blog.createIndex( { name: "text", desc: "text", headername: "text" }, { weights: { content: 10, keywords: 5 }, name: "TextIndex" } )

    4 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  MongoDB API  ·  Flag idea as inappropriate…  ·  Admin →
  12. Add support for latest $lookup step in aggregation pipeline

    In v3.6 of Mongo, the $lookup step of an aggregation pipeline added the ability to join on conditions instead of just an exact match. This is thoroughly documented in the official documentation.

    https://docs.mongodb.com/manual/reference/operator/aggregation/lookup/index.html#join-conditions-and-uncorrelated-sub-queries

    When I attempt to use the step in CosmosDB, I receive the error "Unrecognized parameter to $lookup: let" which indicates that the latest API is not yet supported.

    52 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    9 comments  ·  MongoDB API  ·  Flag idea as inappropriate…  ·  Admin →
  13. Support $geonear query in Azure Cosmos DB Mongo API

    I want to transition my application to use Azure Cosmos DB. It is currently using MongoDB with the latest Mongo C# Driver.

    Most of the functionality is working with just updating the connection string to point to the Azure Cosmos DB.

    However some of the major functionality in my application makes use of MongoDB geonear functionality with code as below:

        public IEnumerable<Tuple<Location, double>> GeoNear(StagedLocation stagedLocation, int matchRadius)
    
    {
    var geoPoint = new BsonDocument
    {
    {"type","Point"},
    {"coordinates",new BsonArray(new []{ stagedLocation.Address.Longitude.Value, stagedLocation.Address.Latitude.Value })}
    };

    var geoNearOptions = new BsonDocument
    {
    {"near", geoPoint},
    {"spherical", true },
    {"limit", 20},
    {"distanceField", "Distance"},
    {"maxDistance", Convert.ToDouble(matchRadius)},
    };

    56 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    3 comments  ·  MongoDB API  ·  Flag idea as inappropriate…  ·  Admin →
  14. Better handling of "request limit too large"

    Here (https://docs.microsoft.com/en-us/azure/cosmos-db/performance-tips) you can see that when you have exceeded your RU/s quota, Cosmos DB will respond with HTTP Status 429 with an HTTP header x-ms-retry-after-ms telling you when you can make the next request. It also says that the request will be retried automatically, if you use the SQL API.

    For the MongoDB API, requests will not be retried automatically and there is nothing telling the user how long to wait before retrying. Instead you have to catch a MongoCommandException, look at the Code property for 16500 and guess when to retry,

    I'd like the same support…

    300 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    10 comments  ·  MongoDB API  ·  Flag idea as inappropriate…  ·  Admin →
  15. 17 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    1 comment  ·  MongoDB API  ·  Flag idea as inappropriate…  ·  Admin →
  16. fix combined path lenght for unique indexes

    Stated in the documentation "combined paths for all unique index properties should not exceed 60 characters"

    But when creating the following Index

    db.Commits.createIndex(
    {

    "BucketId" : 1,
    
    "StreamId" : 1,
    "StreamRevisionFrom" : 1,
    "StreamRevisionTo" : 1,

    }, {unique: true})

    I take the above to be 49 characters.

    The following error is returned

    "Make sure that the property names do not contain invalid characters and that the combined paths for all unique index properties do not exceed 60 characters."

    14 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    6 comments  ·  MongoDB API  ·  Flag idea as inappropriate…  ·  Admin →
  17. Add support for cursor.explain() method

    It would be nice if the cursor.explain() method worked, for troubleshooting performance of ad-hoc queries. Currently it returns empty data for the queryplanner information.

    6 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    2 comments  ·  MongoDB API  ·  Flag idea as inappropriate…  ·  Admin →
  18. partialFilterExpression should be supported

    According to MongoDB documentation, partialFilterExpression is supported since version 3.2: https://docs.mongodb.com/manual/reference/method/db.collection.createIndex/

    When querying Azure Cosmos DB server version I receive "3.2.0" so I am expecting partialFilterExpression to be supported.

    Unfortunately I receive: 'partialFilterExpression' is not supported when trying to create an index using partialFilterExpression.

    I have several remarks here:

    1) Can you provide an exhaustive documentation on features that are implemented and those that are not?
    2) Can you please advertise that you do not support MongoDB API entirely?
    3) Is there a way to track current backlog and status of Mongo DB API implementation at Microsoft? Transparency is the…

    25 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    1 comment  ·  MongoDB API  ·  Flag idea as inappropriate…  ·  Admin →
  19. Support for document validation, using JSON Schema

    Similar to MongoDB v3.6 https://docs.mongodb.com/manual/reference/operator/query/jsonSchema/ Would be useful for both MongoDB API and DocumentDB API

    75 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    7 comments  ·  MongoDB API  ·  Flag idea as inappropriate…  ·  Admin →
  20. Needs documentation about limits when MongoDb API is used

    Seems that information about limitations with MongoDb API is missing,
    or impossible to find. For example mongo has max doc size 16Mb but
    Azure docDb 2Mb, which is correct for CosmosDbWithMongoAPI.
    (Even that documentDb limits documentation which is referred in this site seems to be removed)

    -Maximum document size ?
    -Maximum query payload size ?
    -Maximum query result size ?
    -Maximum size of partition of partitioned collection ?
    -Maximum count of documents in the partition of partitioned collection ?
    -Maximum count of documents in single-partition collection ?
    -MongoDb needs manual creation of indexes, docDb indexes automatically all properties, how about…

    89 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    3 comments  ·  MongoDB API  ·  Flag idea as inappropriate…  ·  Admin →
← Previous 1
  • Don't see your idea?

Feedback and Knowledge Base