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
http://www.thetaphi.de
eMail: u...@thetaphi.de

> -----Original Message-----
> From: Daniel Shane [mailto:sha...@lexum.umontreal.ca]
> Sent: Friday, September 11, 2009 9:01 PM
> To: java-dev@lucene.apache.org
> 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: java-dev-unsubscr...@lucene.apache.org
> For additional commands, e-mail: java-dev-h...@lucene.apache.org



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

Reply via email to