Infinity with Range facets

Hi,

I'm wondering why when I have no values for a given range in the range facet
I get -Infinity for max value and +Infinity for min as this :

"montantLS" : {
"_type" : "range",
"ranges" : [ {
"to" : -10000.0,
"count" : 0,
"min" : "Infinity",
"max" : "-Infinity",
"total_count" : 0,
"total" : 0.0,
"mean" : "NaN"
}, {
"from" : -10000.0,
"to" : -5000.0,
"count" : 0,
"min" : "Infinity",
"max" : "-Infinity",
"total_count" : 0,
"total" : 0.0,
"mean" : "NaN"
}, {
"from" : -5000.0,
"to" : -1000.0,
"count" : 0,
"min" : "Infinity",
"max" : "-Infinity",
"total_count" : 0,
"total" : 0.0,
"mean" : "NaN"
}, {
"from" : -1000.0,
"to" : -500.0,
"count" : 0,
"min" : "Infinity",
"max" : "-Infinity",
"total_count" : 0,
"total" : 0.0,
"mean" : "NaN"
}, {
"from" : -500.0,
"to" : 0.0,
"count" : 0,
"min" : "Infinity",
"max" : "-Infinity",
"total_count" : 0,
"total" : 0.0,
"mean" : "NaN"
}, {
"from" : 0.0,
"to" : 500.0,
"count" : 14,
"min" : 5.0,
"max" : 200.0,
"total_count" : 14,
"total" : 1320.0,
"mean" : 94.28571428571429
}, {
"from" : 500.0,
"to" : 1000.0,
"count" : 6,
"min" : 500.0,
"max" : 800.0,
"total_count" : 6,
"total" : 3400.0,
"mean" : 566.6666666666666
}, {
"from" : 1000.0,
"to" : 5000.0,
"count" : 2,
"min" : 1000.0,
"max" : 2000.0,
"total_count" : 2,
"total" : 3000.0,
"mean" : 1500.0
}, {
"from" : 5000.0,
"to" : 10000.0,
"count" : 1,
"min" : 8000.0,
"max" : 8000.0,
"total_count" : 1,
"total" : 8000.0,
"mean" : 8000.0
}, {
"from" : 10000.0,
"count" : 0,
"min" : "Infinity",
"max" : "-Infinity",
"total_count" : 0,
"total" : 0.0,
"mean" : "NaN"
} ]
}

Is it a normal result ?

Thanks

David.

Thats the default values that the min/max are initialized with, similar that
mean is NaN. I guess we can remove those when serializing the result into
json. Open an issue?

On Sat, Sep 24, 2011 at 9:23 AM, David Pilato david@pilato.fr wrote:

Hi,****


I’m wondering why when I have no values for a given range in the range
facet I get -Infinity for max value and +Infinity for min as this :****


"montantLS" : {
"_type" : "range",
"ranges" : [ {
"to" : -10000.0,
"count" : 0,
"min" : "Infinity",
"max" : "-Infinity",
"total_count" : 0,
"total" : 0.0,
"mean" : "NaN"
}, {
"from" : -10000.0,
"to" : -5000.0,
"count" : 0,
"min" : "Infinity",
"max" : "-Infinity",
"total_count" : 0,
"total" : 0.0,
"mean" : "NaN"
}, {
"from" : -5000.0,
"to" : -1000.0,
"count" : 0,
"min" : "Infinity",
"max" : "-Infinity",
"total_count" : 0,
"total" : 0.0,
"mean" : "NaN"
}, {
"from" : -1000.0,
"to" : -500.0,
"count" : 0,
"min" : "Infinity",
"max" : "-Infinity",
"total_count" : 0,
"total" : 0.0,
"mean" : "NaN"
}, {
"from" : -500.0,
"to" : 0.0,
"count" : 0,
"min" : "Infinity",
"max" : "-Infinity",
"total_count" : 0,
"total" : 0.0,
"mean" : "NaN"
}, {
"from" : 0.0,
"to" : 500.0,
"count" : 14,
"min" : 5.0,
"max" : 200.0,
"total_count" : 14,
"total" : 1320.0,
"mean" : 94.28571428571429
}, {
"from" : 500.0,
"to" : 1000.0,
"count" : 6,
"min" : 500.0,
"max" : 800.0,
"total_count" : 6,
"total" : 3400.0,
"mean" : 566.6666666666666
}, {
"from" : 1000.0,
"to" : 5000.0,
"count" : 2,
"min" : 1000.0,
"max" : 2000.0,
"total_count" : 2,
"total" : 3000.0,
"mean" : 1500.0
}, {
"from" : 5000.0,
"to" : 10000.0,
"count" : 1,
"min" : 8000.0,
"max" : 8000.0,
"total_count" : 1,
"total" : 8000.0,
"mean" : 8000.0
}, {
"from" : 10000.0,
"count" : 0,
"min" : "Infinity",
"max" : "-Infinity",
"total_count" : 0,
"total" : 0.0,
"mean" : "NaN"
} ]
}****


Is it a normal result ?****


Thanks****

David.****