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 08:17:42 GMT
On Thu, Jan 31, 2013 at 9:55 PM, Michael McCandless
<> wrote:

> But are you wanting to, eg, make a NumericRangeQuery if you detect the
> field was indexed numerically, and otherwise a TermRangeQuery, or
> something...?  (Not easy)

This is what I want, yes. But I begin to understand that this is not possible
without storing additional meta-data as neither the index nor the documents
preserve the type info (correct me if I'm wrong). On the other hand, since once
a field (name) has been typified (by auto-detection or a configuration file),
in my case the field will maintain its type across documents and can thus
be an index property. And since auto-detection is not very robust, I think I'll
end needing a schema or type definition after all (field name to type mapping),
which is not difficult to implement (or use Solr, I guess).

Kind regards,

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

View raw message