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, <[email protected]> wrote: > Send General mailing list submissions to > [email protected] > > 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 > [email protected] > > You can reach the person managing the list at > [email protected] > > 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 <[email protected]> > Subject: Re: [MarkLogic Dev General] Element Range Index query not > working > To: MarkLogic Developer Discussion <[email protected]> > Message-ID: <d4f07ba8.19aaca%[email protected]> > 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: <[email protected]<mailto:general- > [email protected]>> on behalf of Mat Gritt < > [email protected]<mailto:[email protected]>> > Reply-To: MarkLogic Developer Discussion <[email protected] > <mailto:[email protected]>> > Date: Thursday, March 16, 2017 at 5:12 PM > To: MarkLogic Developer Discussion <[email protected] > <mailto:[email protected]>> > 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: <[email protected]<mailto:general- > [email protected]>> on behalf of Geert Josten < > [email protected]<mailto:[email protected]>> > Reply-To: MarkLogic Developer Discussion <[email protected] > <mailto:[email protected]>> > Date: Friday, 17 March 2017 at 10:09 AM > To: MarkLogic Developer Discussion <[email protected] > <mailto:[email protected]>> > 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: <[email protected]<mailto:general- > [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. > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: http://developer.marklogic.com/pipermail/general/ > attachments/20170316/3b141182/attachment.html > > ------------------------------ > > _______________________________________________ > General mailing list > [email protected] > Manage your subscription at: > http://developer.marklogic.com/mailman/listinfo/general > > > End of General Digest, Vol 153, Issue 19 > **************************************** >
_______________________________________________ General mailing list [email protected] Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general
