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?
DateTimeattribute in your collection? You would need to add that in order to useOrder Byclause in your query as the error indicates. - Gaurav MantriDateTime, is indexing still possible? - tklepzignot all my documents has the property DateTime, is indexing still possible- Yes. - Gaurav Mantri