Problem with Date Histogram Facet


(Grégory) #1

Hello,

I got a strange behaviour. My documents have a date field (unix timestamp).
The date range is : 2013/09/01 00:00:00 to 2013/09/29.
When i use the Date Histogram Facet with a monthly interval. I expect 1
facet result (as all my date are in September) but i got 2 facet results.

My query is:

{
"query": {
"match_all": {}
},
"facets": {
"results": {
"date_histogram": {
"field": "T",
"interval": "month",
"factor": 1000
}
}
},
"size": 0
}

Any idea ? Thanks you!

--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


(Alexander Reelsen) #2

Hey,

what do the facet results consist of? Is the seemingly wrong one in october
or august? Might that be a timezone issue (everything is UTC from
elasticsearch point of view)? You can use the time_zone parameter in a
facet..

--Alex

On Thu, Oct 10, 2013 at 11:42 PM, Greg gregory.bittan@gmail.com wrote:

Hello,

I got a strange behaviour. My documents have a date field (unix
timestamp). The date range is : 2013/09/01 00:00:00 to 2013/09/29.
When i use the Date Histogram Facet with a monthly interval. I expect 1
facet result (as all my date are in September) but i got 2 facet results.

My query is:

{
"query": {
"match_all": {}
},
"facets": {
"results": {
"date_histogram": {
"field": "T",
"interval": "month",
"factor": 1000
}
}
},
"size": 0
}

Any idea ? Thanks you!

--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


(system) #3