Range on timestamp ruins my query

Hi

I'm trying to set up a date histogram. When I look into the request it forms, I get this:

{
"aggs": {
"2": {
"date_histogram": {
"field": "aanvaard of a-posteriori op",
"interval": "1y",
"time_zone": "Europe/Berlin",
"min_doc_count": 1
}
}
},
"size": 0,
"_source": {
"excludes":
},
"stored_fields": [
"*"
],
"script_fields": {},
"docvalue_fields": [
"@timestamp",
"aanvaard of a-posteriori op",
"certificate.COForm.COFormContent.Signatory.SignatureDate"
],
"query": {
"bool": {
"must": [
{
"range": {
"@timestamp": {
"gte": 1533538243247,
"lte": 1533539143247,
"format": "epoch_millis"
}
}
}
],
"filter": [
{
"match_all": {}
}
],
"should": ,
"must_not":
}
}
}

But I should not have the must/range in there - how can I get rid of it?
I just want to take all my docs and put them into the buckets. Timestamp is the date I added the docs - which was last friday.

Hi Johan.

To the best of my knowledge, date histograms in Kibana always operate on a time range. You can configure the time range to be a custom value (e.g. by clicking on the "Last 5 years" link illustrated below, or the equivalent in your visualization) thus effectively encompassing all documents. But the idea is that it's generally a good idea to limit what you're reporting on to some definite time range.

image

Best,
Chris