Using MongoDB in Azure DocumentDB with .NET driver throws MongoCommandException

Using MongoDB in Azure DocumentDB with .NET driver throws MongoCommandException

I am using Azure DocumentDB to manipulate a MongoDB collection.
I have a 1000 RU/s limit according to my Azure Standard plan.
The issue I experience occurs when I try filtering and sorting some data … Read the rest “Using MongoDB in Azure DocumentDB with .NET driver throws MongoCommandException”

Azure DocumentDB: order by and filter by DateTime

Azure DocumentDB: order by and filter by DateTime

I have the following query:
SELECT * FROM c
WHERE c.DateTime = “2017-03-20T10:07:17.9894476+01:00” AND c.DateTime < = "2017-03-22T10:07:17.9904464+01:00" ORDER BY c.DateTime DESC So as you can see I have a WHERE condition for a property with the type DateTimeand I want to sort my result by the same one. The query ends with the following error: Order-by item requires a range index to be defined on the corresponding index path. I have absolutely no idea what this error message is about 🙁 Has anybody any idea?

Solutions/Answers:

Solution 1:

You can also do one thing that don’t require indexing explicitly. Azure documentBD is providing indexing on numbers field

Read the rest “Azure DocumentDB: order by and filter by DateTime”

In documentdb can i join across collections and update partition key for document

In documentdb can i join across collections and update partition key for document

I just added a partition key while creating collection which is “/countryId”.

is it possible to update countryId for document ?
can i join across collections in documentdb ?

Solutions/Answers:

Solution 1:

Read the rest “In documentdb can i join across collections and update partition key for document”

Azure Functions and DocumentDB triggers

Azure Functions and DocumentDB triggers

Is it possible to specify the DocumentDB is to fire triggers when writing to DocumentDB?
I have an Azure function that pulls JSON messages off a Service Bus Queue and puts them into DocumentDB like so:
using System;
using System.Threading.Tasks;… Read the rest “Azure Functions and DocumentDB triggers”

filtering DocumentDb collection from Data Factory using unix-timestamp

filtering DocumentDb collection from Data Factory using unix-timestamp

I am trying to select some documents from documentDB collection, in an incremental way, so every slice will select based on the “timeCreated” field of the collection.
The problem is that this field (timeCreated) is in seconds … Read the rest “filtering DocumentDb collection from Data Factory using unix-timestamp”

How to create composite partition key in documentdb

How to create composite partition key in documentdb

This is how my document looks, I wanted to choose the partition key as /department/city; which is two different attribute, one form employee and another from address(which is an embedded object to employee). I tried give /department/address … Read the rest “How to create composite partition key in documentdb”