lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Shane <sha...@LEXUM.UMontreal.CA>
Subject Re: NumericRange Field and LuceneUtils?
Date Mon, 14 Sep 2009 15:16:51 GMT
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:
>> 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:
> For additional commands, e-mail:

View raw message