Hi,
I have indexed some numeric properties (double) by adding numeric fields like
this in a custom FieldBridge:
NumericField field = new NumericField(propertyName, Store.YES, true);
field.setDoubleValue(propertyValue);
document.add(field);
This works fine and with my RangeQueries I get results, except in the following
case:
I indexed data with the values 4.5, 7.0 and 10.5 for this double property
(name: price).
When I search maybe for all data with price > 4.5 AND price < 10.5 I got the
correct results, namely data where price=7.0 (The query is "+price:{4.5 TO *}
+price:{* TO 10.5}")
But when I try to search for the opposite, i.e. price <= 4.5 OR price >= 10.5 I
get all data with price=4.5 and price=10.5 but also data with price=7.0 which I
do not expect. The query is: "price:[* TO 4.5] price:[10.5 TO *]"
Did I make something wrong?
Can you help me?
Regards, Jacqueline.
P.S.: The query is built with the NumericFieldUtils like this
NumericFieldUtils.createNumericRangeQuery("price", 4.5, null, false, false);