It's very easy: NumericRangeQuery.nexXxxRange(field, val, val, true, true) -
val is the exact match. This is not slower as this automatically rewrites to a
non-scored TermQuery. If you already changed QueryParser, you can also override
the method for exactMatches (newTermQuery).
-
Uwe Schin
Thanks for the answer Uwe,
Does it matter precision step when I use NumericRangeQuery for exact
matches? I mean if I use the default precision step when indexing that
fields it is guaranteed that:
1. With this query I will always hit the docs that contain "val" for the
"field";
2. I will never
On Fri, Feb 26, 2010 at 3:33 PM, Ivan Vasilev wrote:
> Does it matter precision step when I use NumericRangeQuery for exact
> matches?
No. There is a full-precision version of the value indexed regardless
of the precision step, and that's used for an exact match query.
> I mean if I use the def