Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 84045 invoked from network); 13 Aug 2007 13:20:00 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 13 Aug 2007 13:20:00 -0000 Received: (qmail 13260 invoked by uid 500); 13 Aug 2007 13:19:54 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 12773 invoked by uid 500); 13 Aug 2007 13:19:53 -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 12762 invoked by uid 99); 13 Aug 2007 13:19:52 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Aug 2007 06:19:52 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of erickerickson@gmail.com designates 209.85.128.189 as permitted sender) Received: from [209.85.128.189] (HELO fk-out-0910.google.com) (209.85.128.189) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Aug 2007 13:19:46 +0000 Received: by fk-out-0910.google.com with SMTP id z23so1418696fkz for ; Mon, 13 Aug 2007 06:19:24 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=rUQq9i7oOgkqo7GbHmfRIWaM35FN8RMSnwg5cQcA1LLdtjUOrCqZ4GnYfvqsVuGlKxOyiLKG2NGXvjmqcRbUPYg68hzUMnTvaW1FjmbX3vfjatuFftOE1n/VkJg7fUYl9fpSObc36XtQFbdwVnQnane9nEB/PBi6M7bQrqau/G8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=AHk0I2LcD6vD1zquuhb2r76uVYEeZ+j2cdTy63u1hEHRSD6/epAX3p9Z667tVj0qhm5DC/zdgcUChxTiwJo2FVLoKyI0tAUNUKMwM2Bwpjk7r4fDmsjvokMFrEl38+hvKfSGJWRwSSJXlROZCb4vwqtvw6LKH5L8FbYibYWjl8s= Received: by 10.82.111.8 with SMTP id j8mr7006265buc.1187011164160; Mon, 13 Aug 2007 06:19:24 -0700 (PDT) Received: by 10.82.167.3 with HTTP; Mon, 13 Aug 2007 06:19:20 -0700 (PDT) Message-ID: <359a92830708130619s20f9925ej2fa239cf3876f583@mail.gmail.com> Date: Mon, 13 Aug 2007 09:19:24 -0400 From: "Erick Erickson" To: java-user@lucene.apache.org Subject: Re: Range queries in Lucene - numerical or lexicographical In-Reply-To: <34b8543c0708122210g48aa90a9u690b94ea6beffc1f@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_26868_22748307.1187011164005" References: <359a92830708121051s13ee2939v574b5eeed39b234c@mail.gmail.com> <34b8543c0708122210g48aa90a9u690b94ea6beffc1f@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_26868_22748307.1187011164005 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Uhhhh, because I didn't write the code? You can always contribute a patch. On 8/13/07, Mohammad Norouzi wrote: > > Thanks Erick but unfortunately NumberTools works only with long primitive > type I am wondering why you didn't put some method for double and float. > > > > On 8/13/07, Nilesh Bansal wrote: > > > > Thanks. Probably this should be mentioned on the documentation page. > > > > -Nilesh > > > > On 8/12/07, Erick Erickson wrote: > > > As has been discussed several times, Lucene is a string-only engine, > and > > > has no native understanding of numerical values. You have to normalize > > > them for string searches. See NumberTools. > > > > > > Best > > > Erick > > > > > > On 8/11/07, Nilesh Bansal wrote: > > > > > > > > Hi all, > > > > > > > > Lucene query parser synax page > > > > (http://lucene.apache.org/java/docs/queryparsersyntax.html) provides > > > > the following two examples of range query: > > > > mod_date:[20020101 TO 20030101] > > > > and > > > > title:{Aida TO Carmen} > > > > > > > > Now my question is, numerically 10 is greater than 2, but in > > > > string-only comparison 2 is greater than 10. So if I search for > > > > field:[10 TO 30] > > > > will a document with field=2 will be in result or not. > > > > > > > > And if I search for a string field, > > > > field:[AA TO CC] > > > > will document with field="B" will be in result or not. > > > > > > > > The semantics of range is not clear (numerical or lexicographical) > > > > from the documentation. > > > > > > > > thanks > > > > Nilesh > > > > > > > > -- > > > > Nilesh Bansal. > > > > http://queens.db.toronto.edu/~nilesh/ > > > > > > > > > --------------------------------------------------------------------- > > > > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org > > > > For additional commands, e-mail: java-user-help@lucene.apache.org > > > > > > > > > > > > > > > > > -- > > Nilesh Bansal. > > http://queens.db.toronto.edu/~nilesh/ > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org > > For additional commands, e-mail: java-user-help@lucene.apache.org > > > > > > > -- > Regards, > Mohammad > -------------------------- > see my blog: http://brainable.blogspot.com/ > another in Persian: http://fekre-motefavet.blogspot.com/ > ------=_Part_26868_22748307.1187011164005--