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: <general-boun...@developer.marklogic.com<mailto:general-boun...@developer.marklogic.com>> on behalf of Shiv Shankar <shiv.shivshan...@gmail.com<mailto:shiv.shivshan...@gmail.com>> Reply-To: MarkLogic Developer Discussion <general@developer.marklogic.com<mailto:general@developer.marklogic.com>> Date: Thursday, March 16, 2017 at 8:53 PM To: MarkLogic Developer Discussion <general@developer.marklogic.com<mailto:general@developer.marklogic.com>> 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 General@developer.marklogic.com Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general