I am storing following object in CloudantDB.
SystemLog:
{
"logContext":"ARTLogging",
"logTime":2016-05-04T22:33:02Z,
"logReference":"CloudantARTManager",
"log":"Hello world. Test Message",
"status":"Success"
}
The cloudantdb has following index:
{
"name":"SysLogIdx1",
"ddoc":"SysLogIdx1",
"index":{"fields":
[
{"logContext":"asc"},
{"logTime":"asc"},
{"logReference":"asc"}
]
}
}
I am trying to retreive these logs over 2 mins range with a filter as follows
"selector": {
"logContext": "ARTLogging",
"logTime": {"$gt": "2016-05-04T22:32:02Z"},
"logTime": {"$lt": "2016-05-04T22:34:02Z"},
"logReference": "CloudantARTManager"
}
I also tried with this
"selector":
{"logContext": "ARTLogging",
"logTime": {"$gt": "2016-05-04T22:32:02Z", "$lt": "2016-05-04T22:34:02Z"},
"logReference": "CloudantARTManager"
}
The db.find is not picking any records. But If I remove logTime filter I am getting records properly. What am I doing wrong.
Thanks Madhu