On 14-Jun-07, at 4:29 PM, Kevin Osborn wrote:
I have a large subset (47640) of my total index. Most of them
(45335) have a single field, which we will call Field1. Field1 is a
sfloat.
If my query restricts the resultset to my subset and I do a facet
count on Field1, then the number of records returned is 47640. And
if I sum up the facet counts, it adds to 45335. So far, so good.
But, I really want to do range queries on Field1. So, I use
facet.query to split Field1 into 5 ranges.
So,
&facet.query=Field1%3A%5B4000000000+TO+*%5D
&facet.query=Field1%3A%5B3000000000+TO+3999999999.9%5D
&facet.query=Field1%3A%5B2000000000+TO+2999999999.9%5D
&facet.query=Field1%3A%5B1000000000+TO+1999999999.9%5D
&facet.query=Field1%3A%5B*+TO+999999999.9%5D
Now, if I sum up the counts, it adds to 54697. I can't find where
this number comes from. If I have open-ended ranges on both my high
and low end, shouldn't the sum of facet.query equal the sum of a
normal facet count? And if a record never has more than one
instance of Field1, how can the sum be greater than the total
record set?
My guess is precision issues. Those are mighty large values to be
storing in a binary float--you're probably comparing mostly the
exponent, which is not necessarily disjoint. Have you tried sdouble?
And this problem seems to occur in most (if not all) of my range
queries. Is there anything that I am doing wrong here?
Is this true on other field types as well?
-Mike