new QueryParser(.... ).parse (somequery);
it works only for string indexed fields. Say i have a field called count where count is a integer field (
You need to inherit from QueryParser
and override GetRangeQuery(string field, ...)
. If field
is one of your numeric field names, return an instance of NumericRangeQuery
, otherwise return base.GetRangeQuery(...)
.
There is an example of such an implementation in this thread: http://www.mail-archive.com/java-user@lucene.apache.org/msg29062.html