I would like to retrieve a document, that has two fields for date "startDate" and "endDate", such that a given date "date" is between the document's "startDate" and "endDate".
I can't seem to formulate the range query to give me this scenario, or probably i am using the wrong query here.
Lets say we have the document as:
{
"startDate": "2016-01-01T00:00:00",
"endDate": "2016-12-31T23:59:59"
}
I would like this document to be matched, only if a given date is between the two values.