lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <>
Subject Re: How to get field names and types from an IndexSearcher
Date Thu, 31 Jan 2013 20:55:29 GMT
On Thu, Jan 31, 2013 at 7:31 AM, Rolf Veen <> wrote:
> Thank you, Mike.
> I didn't state why I need this. I want to be able to send
> a query to some QueryParser that understands "field:1"
> regardless if 'field' was added as StringField or LongField,
> for example. I do not want to rely on schema information
> if I can avoid it, and rather use a smart QueryParser.
> What would be the best approach to implement this ?

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)

Or you just want to recognize valid fields vs invalid ones? (Easy)

Mike McCandless

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

View raw message