Ah.  Understood.  Thank you for the clarification!

On Mon, Apr 6, 2015 at 9:52 AM, joergpra...@gmail.com <joergpra...@gmail.com
> wrote:

> In the facet entries, you will receive the default values of min/max if
> total_count is 0, and the defaults are java.lang.Double.POSITIVE_INFINITY
> and java.lang.Double.NEGATIVE_INFINITY. That is, ES never updates min/max
> while processing values, because there are no values.
>
> I would recommend to switch to the aggregation framework, since the old
> facet classes will be dropped from Elasticsearch 2.0
>
> Jörg
>
>
> On Mon, Apr 6, 2015 at 4:44 PM, Chris Neal <chris.n...@derbysoft.net>
> wrote:
>
>> Ok, after some searching of this group, I found some query results from
>> previous versions that had Infinity/-Infinity as well, so it probably
>> wasn't introduced with 1.5.0.
>>
>> Still curious about why the decision to return Strings in a numeric field
>> though :)
>> Maybe someone knows that answer?
>>
>> Much appreciated.
>> Chris
>>
>> On Mon, Apr 6, 2015 at 9:34 AM, Chris Neal <chris.n...@derbysoft.net>
>> wrote:
>>
>>> Hi All,
>>>
>>> This seems like something that should be communicated somewhere if a
>>> type has changed return values.  Prior to 1.5.0, facet return values were
>>> always numeric, now I'm getting "Infinity" and "-Infinity".  See example
>>> below:
>>>
>>> This query:
>>>
>>> {
>>>   "facets":{
>>>     "0":{
>>>       "date_histogram":{
>>>         "key_field":"@timestamp",
>>>         "value_field":"process_duration",
>>>         "interval":"1m"
>>>       },
>>>       "global":true,
>>>       "facet_filter":{
>>>         "fquery":{
>>>           "query":{
>>>             "filtered":{
>>>               "query":{
>>>                 "query_string":{
>>>                   "query":"((_type:perf_typeA AND process:SOMETHING) OR
>>> (_type:typeA AND process:SOMETHINGELSE))"
>>>                 }
>>>               },
>>>               "filter":{
>>>                 "bool":{
>>>                   "must":[
>>>                     {
>>>                       "range":{
>>>                         "@timestamp":{
>>>                           "from":1428328178982,
>>>                           "to":1428329078982
>>>                         }
>>>                       }
>>>                     }
>>>                   ]
>>>                 }
>>>               }
>>>             }
>>>           }
>>>         }
>>>       }
>>>     }
>>>   },
>>>   "size":0
>>> }
>>>
>>> returns this:
>>>
>>> {
>>>   "took" : 123,
>>>   "timed_out" : false,
>>>   "_shards" : {
>>>     "total" : 6,
>>>     "successful" : 6,
>>>     "failed" : 0
>>>   },
>>>   "hits" : {
>>>     "total" : 920732,
>>>     "max_score" : 0.0,
>>>     "hits" : [ ]
>>>   },
>>>   "facets" : {
>>>     "0" : {
>>>       "_type" : "date_histogram",
>>>       "entries" : [ {
>>>         "time" : 1428328140000,
>>>         "count" : 4,
>>> *        "min" : "Infinity",*
>>> *        "max" : "-Infinity",*
>>>         "total" : 0.0,
>>>         "total_count" : 0,
>>>         "mean" : 0.0
>>>       }, {
>>>         "time" : 1428328200000,
>>>         "count" : 7,
>>>         "min" : 1538.0,
>>>         "max" : 1538.0,
>>>         "total" : 1538.0,
>>>         "total_count" : 1,
>>>         "mean" : 1538.0
>>>       }, {
>>>         "time" : 1428328260000,
>>>         "count" : 10,
>>> *        "min" : "Infinity",*
>>> *        "max" : "-Infinity",*
>>>         "total" : 0.0,
>>>         "total_count" : 0,
>>>         "mean" : 0.0
>>>       }, {
>>>         "time" : 1428328320000,
>>>         "count" : 8,
>>> *        "min" : "Infinity",*
>>> *        "max" : "-Infinity",*
>>>         "total" : 0.0,
>>>         "total_count" : 0,
>>>         "mean" : 0.0
>>>       },
>>> <snip>
>>>
>>> That now breaks parsers that are expecting numbers, and now getting
>>> Strings.  I wonder what the reason for this change was?  I cannot find it
>>> in any release notes.
>>>
>>> Anyone have any ideas?
>>>
>>>
>>>
>>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "elasticsearch" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to elasticsearch+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/elasticsearch/CAND3Dpg3aPxNb38d8qWMz36K_SYLG_Z%3DG-D_EQV2OfYCMRQjsg%40mail.gmail.com
>> <https://groups.google.com/d/msgid/elasticsearch/CAND3Dpg3aPxNb38d8qWMz36K_SYLG_Z%3DG-D_EQV2OfYCMRQjsg%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "elasticsearch" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to elasticsearch+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/elasticsearch/CAKdsXoH%2BFKHhhKFyArvdYXNKY%2BNds0BX5Hm4YkTWafa4gi9czQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/elasticsearch/CAKdsXoH%2BFKHhhKFyArvdYXNKY%2BNds0BX5Hm4YkTWafa4gi9czQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elasticsearch+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/CAND3DphwaCzAwpfTFt5DGPKtGFawkUtOh_bpDdA9hCPor1Pv%3DA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to