Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 69336 invoked from network); 15 Mar 2006 16:31:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 15 Mar 2006 16:31:32 -0000 Received: (qmail 37862 invoked by uid 500); 15 Mar 2006 16:31:25 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 37829 invoked by uid 500); 15 Mar 2006 16:31:24 -0000 Mailing-List: contact java-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-user@lucene.apache.org Delivered-To: mailing list java-user@lucene.apache.org Received: (qmail 37814 invoked by uid 99); 15 Mar 2006 16:31:23 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Mar 2006 08:31:23 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of samurujackson@googlemail.com designates 64.233.162.207 as permitted sender) Received: from [64.233.162.207] (HELO zproxy.gmail.com) (64.233.162.207) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Mar 2006 08:31:23 -0800 Received: by zproxy.gmail.com with SMTP id 18so166531nzp for ; Wed, 15 Mar 2006 08:31:02 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=googlemail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=YfSI2QHyWqg0REqO+HRWp754rgEqh47JHHrCsKlKcFh4Li0gcsKokKp6KPglzSV1JVXXONRD6apkvKTIQjjvX0amMcWi9D0MUxBXlV55ftpXST62sA0NgGotG+vK40CQQMCUJbeC96LsnnDAzc8xU0G+Gefoh67seeYfVim55IQ= Received: by 10.65.233.7 with SMTP id k7mr417155qbr; Wed, 15 Mar 2006 08:31:02 -0800 (PST) Received: by 10.65.153.18 with HTTP; Wed, 15 Mar 2006 08:31:02 -0800 (PST) Message-ID: Date: Wed, 15 Mar 2006 17:31:02 +0100 From: "Samuru Jackson" To: java-user@lucene.apache.org Subject: Re: inclusive range search In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N > Try making bother terms mandatory with "+" > > "+date:[20040101 TO 20040101] +Paris" That was it .. however it does not exactly suite my needs. I want to create a few combo boxes to let the user create a datefilter (From and To) on the search queries using a webform. Now if he chooses 20040101 to 20040201 and enters "Paris" (without +) into the searchfield he will get back all documents according to the date plus all documents containing Paris. This result would be valid but not intuitive because if someone is creating a date range he assumes that the delivered results of documents containing Paris will only be inside this daterange. So obviously I want to create a datefilter on the "Paris"-results. What I did is this: TermsFilter filter =3D new TermsFilter(); filter.addTerm(new Term("date", "20060304 TO 20060304")); =09 =09 Query query =3D QueryParser.parse(search.trim(), "text", new StandardAnalyz= er()); =09 But somehow the filter does not work with the "TO" syntax. Can you point me out how to create a "daterange" filter using the QueryPars= er? Thanks again! --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org