Hi Shan, You search on a date that is larger than the two dates in the data, and also specify GT (Greater Than). That will not match either of the startDates. Have you tried with LT or LE?
Not sure if it is relevant, but you provide a date to a dateTime query. Kind regards, Geert From: <[email protected]<mailto:[email protected]>> on behalf of Shiv Shankar <[email protected]<mailto:[email protected]>> Reply-To: MarkLogic Developer Discussion <[email protected]<mailto:[email protected]>> Date: Thursday, March 16, 2017 at 8:53 PM To: MarkLogic Developer Discussion <[email protected]<mailto:[email protected]>> Subject: [MarkLogic Dev General] Element Range Index query not working Hi, My below query below is failing by fetching all data. sample data: { "pid": 1, "fname": "", "lname": "", "pinfo": [ { "screen": "1", "startDate": "2003-02-13T19:18:21.810Z", "endDate": "" }, { "screen": "2", "startDate": "2002-02-13T19:18:21.810Z", "endDate": "" } ] } Search Post: {"query":{"queries":[{"range-query":{"type":"dateTime","json-property":"startDate","value":"2004-05-25","range-operator":"GT"}}]}} Note: created element range index on startDate. Any advise for REST service to compare between the two dates ( that has timestamp) ( I did with QBE also)? Thanks Shan.
_______________________________________________ General mailing list [email protected] Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general
