lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rolf Veen <>
Subject Re: How to get field names and types from an IndexSearcher
Date Fri, 01 Feb 2013 14:22:41 GMT
On Fri, Feb 1, 2013 at 12:43 PM, Michael McCandless
<> wrote:

> There is actually one way to check if a field was indexed numerically:
> you can seek to the first term in the field, and attempt to parse it
> as a long/float/etc., and if that throws a NumberFormatException, it
> was indexed numerically.
> Ie, numeric fields are indexed using the formats from
> oal.util.NumericUtils, which will not parse as "normal" numbers.
> This is what Lucene's FieldCache does to check how to decode numeric
> values when uninverting ...

Very good info.
Thank you, Mike.

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

View raw message