Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 59838 invoked from network); 15 Mar 2006 14:15:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 15 Mar 2006 14:15:07 -0000 Received: (qmail 38823 invoked by uid 500); 15 Mar 2006 14:15:02 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 38799 invoked by uid 500); 15 Mar 2006 14:15:02 -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 38788 invoked by uid 99); 15 Mar 2006 14:15:02 -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 06:15:02 -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.198 as permitted sender) Received: from [64.233.162.198] (HELO zproxy.gmail.com) (64.233.162.198) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Mar 2006 06:15:01 -0800 Received: by zproxy.gmail.com with SMTP id 18so133272nzp for ; Wed, 15 Mar 2006 06:14:40 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=googlemail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=bz5eiqr5Ol6hhFOvBUxp44WJ+pgTLdlE8utGKtrdJv7QdovVdZegj1T1mn8KWB3UB+vUl7Jc5sUQaUkYuv8ltcPsoeEIEdpiidunxMma0Iqb1/bWcJLISr8wTRFsRXd1NLmvrC9SHbtYFMGiLbJGhXXT0NEYC8cFfEyuGdV+QQ4= Received: by 10.65.213.5 with SMTP id p5mr324033qbq; Wed, 15 Mar 2006 06:14:39 -0800 (PST) Received: by 10.65.153.18 with HTTP; Wed, 15 Mar 2006 06:14:39 -0800 (PST) Message-ID: Date: Wed, 15 Mar 2006 15:14:39 +0100 From: "Samuru Jackson" To: java-user@lucene.apache.org Subject: inclusive range search MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hi! I have some trouble to use the inclusive range search explained in Lucene in Action in ch. 2.5.5 What I do is to add several fields to the index this way: document.add(Field.Keyword("id", key)); document.add(Field.Keyword("type", type)); document.add(Field.Text("text",text)); document.add(Field.Text("date",date)); The focus lies on "Field.Text("date", date)" where date is a String of the format YYYYMMDD. My search goes this way: search =3D "date:[20040101 TO 20040101] Paris" Query query =3D QueryParser.parse(search.trim(), "text", new StandardAnalyz= er()); Hits hits =3D indexSearcher.search(query); Somehow this range search does not work. I still get the same results as without the date:[..] Can anyone give me a hint how to use this inclusive range search? Thanks! --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org