elasticsearch-timefacets-plugin
elasticsearch-timefacets-plugin copied to clipboard
Timefacets returns incorrect count when timeZone is non-zero
Facet: "facets": { "distinct": { "distinct_date_histogram": { "key_field": "time", "interval": "day", "timeZone": -7.0, "value_field": "userName" } } }
Result: "facets": { "distinct": { "_type": "distinct_date_histogram", "entries": [ { "time": 1392879600000, "count": 2 }, { "time": 1392966000000, "count": 2 }, { "time": 1395212400000, "count": 1 }, { "time": 1395817200000, "count": 2 } ], "count": 2 } }
Expecting: { "time": 1395817200000, "count": 3 }
There are three userNames for this day: [diranl, dcervelli, admin]. I don't understand why the timefacets only returns two.
hi
unfortunately, this plugin is no longer maintained, since we have switched to our new project crate https://crate.io/ which uses, besides other libs, elasticsearch under the hood. the functionality of this plugin is partly provided by the date_trunc
function. see https://github.com/crate/crate/blob/master/docs/sql/scalar.txt
regards, bernd