Hi Greet,
First thing is it is in dateTime. I tried with another field that
has date only. Same issue with the below query as it is fetching all
records that are not matching also. I tested with LT, LS. No difference.
Secondly, tried extracting only first 10 digits to compare the date only
out of dateTime, I see no option when using with REST search query. Please
advise if we have source with dateTime and searching only with date in REST
call.

Thanks
Shan.

On Thu, Mar 16, 2017 at 5:28 PM, <general-requ...@developer.marklogic.com>
wrote:

> Send General mailing list submissions to
>         general@developer.marklogic.com
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         http://developer.marklogic.com/mailman/listinfo/general
> or, via email, send a message with subject or body 'help' to
>         general-requ...@developer.marklogic.com
>
> You can reach the person managing the list at
>         general-ow...@developer.marklogic.com
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of General digest..."
>
>
> Today's Topics:
>
>    1. Re: Element Range Index query not working (Dave Cassel)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Thu, 16 Mar 2017 21:28:22 +0000
> From: Dave Cassel <dave.cas...@marklogic.com>
> Subject: Re: [MarkLogic Dev General] Element Range Index query not
>         working
> To: MarkLogic Developer Discussion <general@developer.marklogic.com>
> Message-ID: <d4f07ba8.19aaca%dave.cas...@marklogic.com>
> Content-Type: text/plain; charset="us-ascii"
>
> http://developer.marklogic.com/mailman/listinfo/general
>
> --
> Dave Cassel, @dmcassel<https://twitter.com/dmcassel>
> Technical Community Manager
> MarkLogic Corporation<http://www.marklogic.com/>
> http://developer.marklogic.com/
>
>
> From: <general-boun...@developer.marklogic.com<mailto:general-
> boun...@developer.marklogic.com>> on behalf of Mat Gritt <
> mat.gr...@solnet.co.nz<mailto:mat.gr...@solnet.co.nz>>
> Reply-To: MarkLogic Developer Discussion <general@developer.marklogic.com
> <mailto:general@developer.marklogic.com>>
> Date: Thursday, March 16, 2017 at 5:12 PM
> To: MarkLogic Developer Discussion <general@developer.marklogic.com
> <mailto:general@developer.marklogic.com>>
> Subject: Re: [MarkLogic Dev General] Element Range Index query not working
>
> How do I unsubscribe to this list?
>
> Thank you for your help
>
>
> Mat
>
> From: <general-boun...@developer.marklogic.com<mailto:general-
> boun...@developer.marklogic.com>> on behalf of Geert Josten <
> geert.jos...@marklogic.com<mailto:geert.jos...@marklogic.com>>
> Reply-To: MarkLogic Developer Discussion <general@developer.marklogic.com
> <mailto:general@developer.marklogic.com>>
> Date: Friday, 17 March 2017 at 10:09 AM
> To: MarkLogic Developer Discussion <general@developer.marklogic.com
> <mailto:general@developer.marklogic.com>>
> Subject: Re: [MarkLogic Dev General] Element Range Index query not working
>
> 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.
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: http://developer.marklogic.com/pipermail/general/
> attachments/20170316/3b141182/attachment.html
>
> ------------------------------
>
> _______________________________________________
> General mailing list
> General@developer.marklogic.com
> Manage your subscription at:
> http://developer.marklogic.com/mailman/listinfo/general
>
>
> End of General Digest, Vol 153, Issue 19
> ****************************************
>
_______________________________________________
General mailing list
General@developer.marklogic.com
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to