Return-Path: X-Original-To: apmail-lucene-solr-user-archive@minotaur.apache.org Delivered-To: apmail-lucene-solr-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 43E8010CA6 for ; Sat, 12 Apr 2014 23:09:22 +0000 (UTC) Received: (qmail 7380 invoked by uid 500); 12 Apr 2014 23:09:17 -0000 Delivered-To: apmail-lucene-solr-user-archive@lucene.apache.org Received: (qmail 7216 invoked by uid 500); 12 Apr 2014 23:09:17 -0000 Mailing-List: contact solr-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: solr-user@lucene.apache.org Delivered-To: mailing list solr-user@lucene.apache.org Received: (qmail 7208 invoked by uid 99); 12 Apr 2014 23:09:17 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 12 Apr 2014 23:09:17 +0000 X-ASF-Spam-Status: No, hits=2.8 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of furkankamaci@gmail.com designates 209.85.214.174 as permitted sender) Received: from [209.85.214.174] (HELO mail-ob0-f174.google.com) (209.85.214.174) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 12 Apr 2014 23:09:13 +0000 Received: by mail-ob0-f174.google.com with SMTP id wo20so7651597obc.33 for ; Sat, 12 Apr 2014 16:08:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=QEYngN5aneU7sVblJINqYZs1vXb9iVXwsmrDHURyR9Y=; b=BlScxWRzSdNTDxepvAiQmdEftAVBRgZxX4cOyYIDZltnN79Dl6VzCB7wXKLBBg9jqH YiyTF3KQezYXw14atasBWIhzcMG3b+/V47oQFss7W5kagki4Cbm02NQSNRshUV11ZVrT S44Jabl3v5xzCGMvPcWS/A1bFWtPspt+VK3RSDg7naBl0sxtSh5yBLUm3MVgSag+30QR FoOHRu4nqYwSj7F9VrdfdLO+sxwXqSotwh5IgionErihIE/pi4rV+eIbLwGgzsLeF6zA vjCz3OH2YwgZG6yzQCXZMYDpr5wTzLcPl0OUFPC7Eg9wm+sLH6XnTWFAILXPUJECvms5 TQzw== MIME-Version: 1.0 X-Received: by 10.182.33.6 with SMTP id n6mr22637obi.48.1397344130870; Sat, 12 Apr 2014 16:08:50 -0700 (PDT) Received: by 10.76.8.202 with HTTP; Sat, 12 Apr 2014 16:08:50 -0700 (PDT) In-Reply-To: <1397336896517-4130807.post@n3.nabble.com> References: <1397334799453-4130802.post@n3.nabble.com> <5E9FE50890864306B6583EEED7D8609A@JackKrupansky14> <1397336896517-4130807.post@n3.nabble.com> Date: Sun, 13 Apr 2014 02:08:50 +0300 Message-ID: Subject: Re: Fetching document by comparing date to today date From: Furkan KAMACI To: "solr-user@lucene.apache.org" Content-Type: multipart/alternative; boundary=089e0158a8368cbfa904f6e08871 X-Virus-Checked: Checked by ClamAV on apache.org --089e0158a8368cbfa904f6e08871 Content-Type: text/plain; charset=ISO-8859-1 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 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 does solr provide out of the box functionality if > i have the below three documents set, how can i get only doc2 if i assume > todays date is 14-APRIL-2014 > > for simplicity i gave the liveDate as dates beginning at the start of each > month but in real life these dates can be anything. > > > > > > > -- > View this message in context: > http://lucene.472066.n3.nabble.com/Fetching-document-by-comparing-date-to-today-date-tp4130802p4130807.html > Sent from the Solr - User mailing list archive at Nabble.com. > --089e0158a8368cbfa904f6e08871--