Azure Cosmos DB: MongoDB API

Azure Cosmos DB supports the MongoDB API. This means that by using existing drivers, your application written for MongoDB can now communicate with Cosmos DB instead of MongoDB databases, and gain benefits like global distribution & elastic scale.

(thinking…)

Enter your idea and we'll search to see if someone has already suggested it.

If a similar idea already exists, you can support and comment on it.

If it doesn't exist, you can post your idea so others can support it.

Enter your idea and we'll search to see if someone has already suggested it.

  1. 1 vote
    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)

      We’ll send you updates on this idea

      0 comments  ·  Flag idea as inappropriate…  ·  Admin →
    • Pull filter with In/Contains

      Want to remove items from HomeTimeline which exist in another list (unfollowedUserHomeTimelineIds) while I update the User object with a couple of more things.

      var update = Builders<User>.Update
      .Inc(u => u.FollowingCount, -1)
      .PullFilter(p => p.Following, f => f.Id == unfollowedUserObjectId)
      .PullFilter(p => p.HomeTimeline, Builders<Reference>.Filter.In(r => r.Id, unfollowedUserHomeTimelineIds));
      var result = Users.UpdateOneAsync(p => p.Id == myUserObjectId, update).Result;
      the above is resulting in:

      MongoCommandException: Command update failed: Operator ''OPERATOR_PULL' with condition' is not supported.

      1 vote
      Sign in
      Check!
      (thinking…)
      Reset
      or sign in with
      • facebook
      • google
        Password icon
        I agree to the terms of service
        Signed in as (Sign out)

        We’ll send you updates on this idea

        0 comments  ·  Flag idea as inappropriate…  ·  Admin →
      • Add $elementMatch support in projections

        Currently Document DB fails to execute queries that have an $elementMatch in the projection fields.

        It´s usefull to reduce the amount of traffic in large arrays and it's of course supported in MongoDB. Until this is done, it would be nice if the DB reports unsupported (like with other un suported features) instead of an incorrect "Syntax error". It´s confusing and takes time to debug against a real Mongodb instance.

        Jose Luis Pedrosa

        10 votes
        Sign in
        Check!
        (thinking…)
        Reset
        or sign in with
        • facebook
        • google
          Password icon
          I agree to the terms of service
          Signed in as (Sign out)

          We’ll send you updates on this idea

          0 comments  ·  Flag idea as inappropriate…  ·  Admin →
        • Allow for random sample

          It would be great if mongodb's $sample (https://docs.mongodb.com/manual/reference/operator/aggregation/sample/) worked in Cosmos DB--it is not currently supported and I don't know any other way to find a random sample of N documents.

          2 votes
          Sign in
          Check!
          (thinking…)
          Reset
          or sign in with
          • facebook
          • google
            Password icon
            I agree to the terms of service
            Signed in as (Sign out)

            We’ll send you updates on this idea

            0 comments  ·  Flag idea as inappropriate…  ·  Admin →
          • 19 votes
            Sign in
            Check!
            (thinking…)
            Reset
            or sign in with
            • facebook
            • google
              Password icon
              I agree to the terms of service
              Signed in as (Sign out)

              We’ll send you updates on this idea

              3 comments  ·  Flag idea as inappropriate…  ·  Admin →
            • Unique indexes on field in collection

              At this moment it is not possible to create unique indexes on a field in a collection (which is not a primary key).

              Through the Mongo Db driver, I can use the "CreateIndex" method without any problem, it returns "Ok", but the index never appears in MongoChef or RoboMongo to be applied on the collection.

              It would be nice to have unique index capacities in MongoDb through Azure Cosmos Db

              7 votes
              Sign in
              Check!
              (thinking…)
              Reset
              or sign in with
              • facebook
              • google
                Password icon
                I agree to the terms of service
                Signed in as (Sign out)

                We’ll send you updates on this idea

                2 comments  ·  Flag idea as inappropriate…  ·  Admin →
              • Joining documents in multiple collections

                I would like to join a document to related documents in another collection (which are not embedded in same collection) in 1 roundtrip.

                For example: Person has an address (and is stored seperately), or more complex to retrieve data for a relationship with three entities in separate linked collection.

                It seems that $lookup is the solution, but it isn't supported yet through RoboMongo or Mongo driver.

                Are there other solutions at this moment?

                15 votes
                Sign in
                Check!
                (thinking…)
                Reset
                or sign in with
                • facebook
                • google
                  Password icon
                  I agree to the terms of service
                  Signed in as (Sign out)

                  We’ll send you updates on this idea

                  4 comments  ·  Flag idea as inappropriate…  ·  Admin →
                • Add support for "Search text" ($text Operator)

                  Support for "Mongo Search Text" (https://docs.mongodb.com/manual/text-search/). Example of use:

                  db.stores.find( { $text: { $search: "java coffee shop" } } )

                  7 votes
                  Sign in
                  Check!
                  (thinking…)
                  Reset
                  or sign in with
                  • facebook
                  • google
                    Password icon
                    I agree to the terms of service
                    Signed in as (Sign out)

                    We’ll send you updates on this idea

                    0 comments  ·  Flag idea as inappropriate…  ·  Admin →
                  • support COUNT of a query on a partitioned collection

                    db.collection.count() works just find but when attempting to count a filtered down collection db.collection.find({query...}).count() results in an Operation Failure that says 'query in command must target a single shard key' but need to be able to do counts across multiple partitions

                    6 votes
                    Sign in
                    Check!
                    (thinking…)
                    Reset
                    or sign in with
                    • facebook
                    • google
                      Password icon
                      I agree to the terms of service
                      Signed in as (Sign out)

                      We’ll send you updates on this idea

                      3 comments  ·  Flag idea as inappropriate…  ·  Admin →
                    • Add support for ProjectDefinition and SortDefinition from MongoAPI to query DocumentDB

                      I am using following code (MongoDB C# driver) to projects fields , where queryDocument = '{{ "FullName" : /myname/i }}'

                      BsonDocument projectionDefination = Builders.Projection.ToBsonDocument();
                      projectionDefination.Add(new BsonElement("FullName", "myname"));
                      collection.Find(queryDocument).Project(projectionDefination);

                      getting following error:

                      {"Command failed."}

                      {{ "_t" : "OKMongoResponse", "ok" : 0, "code" : 9, "errmsg" : "Syntax error, incorrect syntax near '9'.", "$err" : "Syntax error, incorrect syntax near '9'." }}

                      Can anyone update on this?

                      I also tried above with RoboMongo

                      Command: db.getCollection('Employee').find({ "FullName": /User/i}).projection({ "FullName" : "$FullName" })

                      Received following error:

                      Error: error: { "_t" : "OKMongoResponse", "ok" : 0, "code" : 9, "errmsg" : "Syntax error, incorrect syntax…

                      1 vote
                      Sign in
                      Check!
                      (thinking…)
                      Reset
                      or sign in with
                      • facebook
                      • google
                        Password icon
                        I agree to the terms of service
                        Signed in as (Sign out)

                        We’ll send you updates on this idea

                        1 comment  ·  Flag idea as inappropriate…  ·  Admin →
                      • Azure CosmosDB is too expensive for small but multiple collections

                        Currently using on-prem MongoDB (on Linux) and wish to move to Azure, but I find CosmosDB is too expensive for small but multiple (MongoDB)collections because it seems that a minimum of 400 RRU's/per second will be charged for each collection.

                        The terminology used on the pricing web pages is somewhat unclear though and I am not sure if the pricing for the minimum of 400 RRU's/second applies to partitions or collection (or if these terms are in fact identical semantically)

                        40 votes
                        Sign in
                        Check!
                        (thinking…)
                        Reset
                        or sign in with
                        • facebook
                        • google
                          Password icon
                          I agree to the terms of service
                          Signed in as (Sign out)

                          We’ll send you updates on this idea

                          13 comments  ·  Flag idea as inappropriate…  ·  Admin →
                        • Aggregation Pipeline

                          Need support for MongoDB's aggregation pipeline

                          18 votes
                          Sign in
                          Check!
                          (thinking…)
                          Reset
                          or sign in with
                          • facebook
                          • google
                            Password icon
                            I agree to the terms of service
                            Signed in as (Sign out)

                            We’ll send you updates on this idea

                            0 comments  ·  Flag idea as inappropriate…  ·  Admin →
                          • Do you support or plan to support querying of the replica sets?

                            Do you support or plan to support querying of the replica sets? The scenario I'm thinking is the restore of partial data based on business logic. For instance, we might want to restore the data of a single customer, without touching the rest of the customers. If we can query a specific snapshot, we could merge those documents into the active account, those restoring the customer only data.

                            1 vote
                            Sign in
                            Check!
                            (thinking…)
                            Reset
                            or sign in with
                            • facebook
                            • google
                              Password icon
                              I agree to the terms of service
                              Signed in as (Sign out)

                              We’ll send you updates on this idea

                              0 comments  ·  Flag idea as inappropriate…  ·  Admin →
                            • Don't see your idea?

                            Azure Cosmos DB: MongoDB API

                            Feedback and Knowledge Base