Re: Fetching document by comparing date to today date

2014-04-12 Thread Erick Erickson
You haven't told us under what criteria you would exclude the March document. Do you want only docs that are in the current month? If so, date:[NOW/MONTH TO NOW/MONTH+1MONTH] should do it. Best, Erick On Sat, Apr 12, 2014 at 4:08 PM, Furkan KAMACI wrote: > Hi Darniz; > > Why don't you filter you

Re: Fetching document by comparing date to today date

2014-04-12 Thread Furkan KAMACI
Hi Darniz; Why don't you filter your documents that has a date until TODAY and then sort them by date and finally get only 1 document with rows=1 ? Thanks; Furkan KAMACI 2014-04-13 0:08 GMT+03:00 Darniz : > Thanks for the quick answer i was able to solve my problem with the > addition > of two

Re: Fetching document by comparing date to today date

2014-04-12 Thread Darniz
Thanks for the quick answer i was able to solve my problem with the addition of two new fields and if todays date is april14 my query is (liveStartDate:[* TO 2014-04-14T00:00:00Z] AND liveEndDate:[2014-04-14T00:00:00Z TO *]) and its fetches me the correct document guess my initial question doe

Re: Fetching document by comparing date to today date

2014-04-12 Thread Jack Krupansky
Date math lets you add and subtract offsets in various date and time units and truncate to a specified unit as well. For example: q=someDateField:[NOW/DAY TO NOW+1DAY/DAY} Note the use of "}" to exclude the end point of a range. Also, be careful to URL-encode the "+", otherwise URL parsing wi