lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler" <>
Subject RE: NumericRange Field and LuceneUtils?
Date Fri, 11 Sep 2009 20:37:56 GMT
Hallo Daniel,

I am not really sure what you are talking about (what is LuceneUtils?).

To your question about NumericField: NumericField is only used for indexing.
If you also store the field to retrieve it from the index e.g. with search
results, NumericField creates a stored Field containing the number as a
conventional string (the special trie encoding is only used for *indexing*
not *storing*). If you call getField() it returns a standard Field containg
the number as String.

Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen

> -----Original Message-----
> From: Daniel Shane [mailto:shaned@LEXUM.UMontreal.CA]
> Sent: Friday, September 11, 2009 9:01 PM
> To:
> Subject: NumericRange Field and LuceneUtils?
> Is it normal that LuceneUtils.getString(Document document, String
> fieldName) uses document.getField() in the background?
> If, for example, you indexed something using the new NumericRange field,
> then you will get a class cast exception in there.
> Would it not be better to call getFieldable() instead of getField()?
> Daniel Shane
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message