Hi,
I try to use "pre_zone_adjust_large_interval":true with 'date_histogram' as
follows:
{
"size":0,
"facets":{
"rated_good":{
"date_histogram":{
"pre_zone_adjust_large_interval":true,
"field":"chat.start_date",
"interval":"day",
"pre_zone":"Europe/Warsaw"
},
"facet_filter":{
"and":[
{
"range":{
"chat.start_date":{
"from":"2012-03-28T23:46:26Z",
"to":"2012-03-28T23:46:27Z"
}
}
},
{
"term":{
"chat.rate":2
}
}
]
}
}
}
}
This request will find one document that has chat.start_date =
"2012-03-28T23:46:26Z" (in Europe/Warsaw it is "2012-03-29T01:46:26"). The
datetime in the response should be: "2012-03-28T22:00:00Z" right? (it
is 2012-03-29T00:00:00Z converted to 2012-03-28T22:00:00Z due
to pre_zone_adjust_large_interval set to true and pre_zone
"Europe/Warsaw"), but as you can see below it is 1332979200000 which is
exactly 2012-03-29T00:00:00Z as it is when not
using pre_zone_adjust_large_interval. Am I doing something wrong (most
probably :))?
The result is of the request above is:
{
"took" : 11,
"timed_out" : false,
"_shards" : {
"total" : 5,
"successful" : 5,
"failed" : 0
},
"hits" : {
"total" : 1048608,
"max_score" : 1.0,
"hits" : [ ]
},
"facets" : {
"rated_good" : {
"_type" : "date_histogram",
"entries" : [ {
"time" : 1332979200000,
"count" : 1
} ]
}
}
}
Thanks for help.
Best regards
Marcin.