Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 38745 invoked from network); 14 Sep 2009 15:17:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 14 Sep 2009 15:17:28 -0000 Received: (qmail 45292 invoked by uid 500); 14 Sep 2009 15:17:27 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 45220 invoked by uid 500); 14 Sep 2009 15:17:27 -0000 Mailing-List: contact java-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@lucene.apache.org Delivered-To: mailing list java-dev@lucene.apache.org Received: (qmail 45212 invoked by uid 99); 14 Sep 2009 15:17:27 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Sep 2009 15:17:27 +0000 X-ASF-Spam-Status: No, hits=3.4 required=10.0 tests=HTML_MESSAGE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [132.204.246.22] (HELO pruche.dit.umontreal.ca) (132.204.246.22) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Sep 2009 15:17:16 +0000 Received: from gw-mail.lexum.umontreal.ca (gw-mail.lexum.umontreal.ca [132.204.136.52]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id n8EFGpa3010732 for ; Mon, 14 Sep 2009 11:16:52 -0400 Received: from [192.168.4.150] (siracusa.lan.lexum.pri [::ffff:192.168.4.150]) (AUTH: PLAIN shaned, SSL: TLSv1/SSLv3,256bits,AES256-SHA) by gw-mail.lexum.umontreal.ca with esmtp; Mon, 14 Sep 2009 11:16:51 -0400 id 000273CA.4AAE5E63.000054C4 Message-ID: <4AAE5E63.5040601@lexum.umontreal.ca> Date: Mon, 14 Sep 2009 11:16:51 -0400 From: Daniel Shane User-Agent: Thunderbird 2.0.0.19 (X11/20081216) MIME-Version: 1.0 To: java-dev@lucene.apache.org Subject: Re: NumericRange Field and LuceneUtils? References: <9ac0c6aa0909111132s69804fa5vbf5590ea6181ef7a@mail.gmail.com> <4AAA9E83.6090202@lexum.umontreal.ca> <6869825E6B56402F8FFB1EF79BEDD02C@VEGA> <6BA66EC75497437298384200755D2F60@VEGA> In-Reply-To: <6BA66EC75497437298384200755D2F60@VEGA> Content-Type: multipart/alternative; boundary="------------000800040002010200030605" X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV3361=0 X-Virus-Checked: Checked by ClamAV on apache.org --------------000800040002010200030605 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sorry for all the confusion, indeed, the LuceneUtils class I was talking about is not in the Lucene distro, so I'd like to appologize if I wasted anyones time on this... *guilt*. I'll second Yonik in thinking that maybe getField() is a bit broken since it may lead to class cast exceptions, even though the JavaDoc says not to use it with lazy loading fields. Daniel Shane Uwe Schindler wrote: >> On Fri, Sep 11, 2009 at 4:45 PM, Uwe Schindler wrote: >> >>> By the way: This is documented: >>> http://hudson.zones.apache.org/hudson/job/Lucene- >>> >> trunk/javadoc/core/org/apac >> >>> he/lucene/document/NumericField.html >>> >>> NOTE: This class is only used during indexing. When retrieving the >>> >> stored >> >>> field value from a Document instance after search, you will get a >>> conventional Fieldable instance where the numeric values are returned as >>> Strings (according to toString(value) of the used data type). >>> >>> (this o.a.l.document.Fieldable is always a o.a.l.document.Field) >>> >> Lazy loading could return a different implementation. Even w/o lazy >> loading, we're also not going to guarantee that a Fieldable is always >> a Field, right? Perhaps those methods returning a Field should be >> deprecated sometime. >> > > Yes. But this is not related to NumericField at all. But it would provide us > the possibility to return also NumericField instances from stored fields > some time in future. > > Uwe > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org > For additional commands, e-mail: java-dev-help@lucene.apache.org > > --------------000800040002010200030605 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sorry for all the confusion, indeed, the LuceneUtils class I was talking about is not in the Lucene distro, so I'd like to appologize if I wasted anyones time on this... *guilt*.

I'll second Yonik in thinking that maybe getField() is a bit broken since it may lead to class cast exceptions, even though the JavaDoc says not to use it with lazy loading fields.

Daniel Shane

Uwe Schindler wrote:
On Fri, Sep 11, 2009 at 4:45 PM, Uwe Schindler <uwe@thetaphi.de> wrote:
    
By the way: This is documented:
http://hudson.zones.apache.org/hudson/job/Lucene-
      
trunk/javadoc/core/org/apac
    
he/lucene/document/NumericField.html

NOTE: This class is only used during indexing. When retrieving the
      
stored
    
field value from a Document instance after search, you will get a
conventional Fieldable instance where the numeric values are returned as
Strings (according to toString(value) of the used data type).

(this o.a.l.document.Fieldable is always a o.a.l.document.Field)
      
Lazy loading could return a different implementation.  Even w/o lazy
loading, we're also not going to guarantee that a Fieldable is always
a Field, right?  Perhaps those methods returning a Field should be
deprecated sometime.
    

Yes. But this is not related to NumericField at all. But it would provide us
the possibility to return also NumericField instances from stored fields
some time in future.

Uwe


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org

  

--------------000800040002010200030605--