> Actually what I ideally want I really want is for lucene to realise that
> when a particular field is being searched (in this case qdur) it should
> convert the values to allow the range to work properly, i.e by flagging
> a field as being numeric when you create the index.

It is simple:
Subclass QueryParser and override getRangeQuery and construct the correct
range query for your field type. If the supplied field name is not the one
you want to modify pass to super().

Something like:
@Override public Query getRangeQuery(...) {
        if ("qdur".equals(fieldname) {
                ...return YourFavoriteQuery...
        } else return super.getRangeQuery(...)
}

This also works with the new NumericRangeQuery and NumericField as suggested
in other mails.

Uwe


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

Reply via email to