elasticsearch-timefacets-plugin icon indicating copy to clipboard operation
elasticsearch-timefacets-plugin copied to clipboard

Timefacets returns incorrect count when timeZone is non-zero

Open diranl opened this issue 10 years ago • 1 comments

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.

diranl avatar Apr 03 '14 04:04 diranl

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

dobe avatar Apr 07 '14 07:04 dobe