Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 32832 invoked from network); 1 Jun 2010 13:34:51 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 1 Jun 2010 13:34:51 -0000 Received: (qmail 43901 invoked by uid 500); 1 Jun 2010 13:34:49 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 43874 invoked by uid 500); 1 Jun 2010 13:34:49 -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 43866 invoked by uid 99); 1 Jun 2010 13:34:49 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Jun 2010 13:34:49 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of mindas@gmail.com designates 72.14.220.159 as permitted sender) Received: from [72.14.220.159] (HELO fg-out-1718.google.com) (72.14.220.159) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Jun 2010 13:34:41 +0000 Received: by fg-out-1718.google.com with SMTP id 16so984223fgg.5 for ; Tue, 01 Jun 2010 06:34:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type; bh=h4wWppKkSra9cWDTAMCgaszC4rZggXlOb+JhXxzHiRw=; b=Zi3JhMVM0m2xF37AsjFsxSmsdLyn4/c0aadbOgsosOFf5+js90ROBFG1s33ucTE1Bl 4H71N0x58eEWsCdyme1Hf5Mid5ji6LlwVOGO5FgomNyNEfmNCAyW5ItTBzeEBEAUw89V 4pfg1zAPh3tDRTP6u+/S744UNLZIfqp6hW4WU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=UMqca9s3X93SqIzAT1/JRzcCDfROP2K5Y6xeKWNc+WSvZSnk6zAhXEqFerIiuAY4C0 qbJhPs3NUz2amPpHIoS99Iu0c8qqzolgHinISsP9dAWLlEoR+mhhX0vUKbpvZWJ1sgKV PHXGHN60jHaiKXSU7XkaDgZlYcpTs1xoFxSkA= MIME-Version: 1.0 Received: by 10.239.183.145 with SMTP id u17mr495863hbg.209.1275399260920; Tue, 01 Jun 2010 06:34:20 -0700 (PDT) Received: by 10.239.171.147 with HTTP; Tue, 1 Jun 2010 06:34:20 -0700 (PDT) In-Reply-To: <00b101cb0186$b2571cd0$17055670$@thetaphi.de> References: <00b101cb0186$b2571cd0$17055670$@thetaphi.de> Date: Tue, 1 Jun 2010 14:34:20 +0100 Message-ID: Subject: Re: NumericField API From: =?ISO-8859-13?Q?Mindaugas_=DEak=F0auskas?= To: java-user@lucene.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org Hi, Thanks for your reply Uwe. Just a couple of notes: >> In order to get rid of this exception, I had to change one of the > following: >> - SortField must be changed from SortField.STRING to SortField.LONG > > This does the trick and is *not* weird. You are using *numeric* fields, so > you cannot sort as lexical *terms/strings* Fair enough. I don't know if this is easily doable, but maybe it would be worth changing the exception text to be a bit more readable? Because I had to spend a fair amount of time digging into "creationDate field has become tokenized? How could that happen for numeric fields?" direction. As from your answer - all that matters in this case is the sorting rather than indexing. > The above exception may be caused by something different: Can it be that you > have an old index that already had non-NumericField documents in it? If this > is so, you have a mixed field contents and then behavior of range query and > sort is wrong. I have completely reindexed all documents so this clearly isn't the case. > >> 3) NumericField API is marked as experimental and volatile >> (http://lucene.apache.org/java/3_0_1/api/core/index.html). Is there any >> other "stable" API I can rely on in Lucene 3.0? If not, what would be > possible >> NumericField replacement I could use now? > > "Experimental" in Lucene's API *only* means that the API (method signatures, > classes) may change suddenly. The features are tested and working. My point was - I totally understand that a piece of API could have been made deprecated and replaced with something else. That's the life we're living. But would it not then make sense to replace it with something else which is also reasonably stable (in terms of API)? Because developers aren't left with many options now - they have to convert from using one API which is unavailable to another which is likely to change rather sooner than later. It's just an early observation as historically Lucene has been doing an amazing job in terms of API stability. Regards, Mindaugas --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org