# \[BUG?\] date\_histogram hard\_bounds returns unknown\_field

**URL:** <https://discuss.elastic.co/t/bug-date-histogram-hard-bounds-returns-unknown-field/260825>\
**Category:** Elasticsearch\
**Created:** [January 12, 2021, 11:36am UTC](https://discuss.elastic.co/t/bug-date-histogram-hard-bounds-returns-unknown-field/260825 "2021-01-12T11:36:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![demasie](https://avatars.discourse-cdn.com/v4/letter/d/ba8739/32.png) [@demasie](https://discuss.elastic.co/u/demasie)\
**Post date:** [January 12, 2021, 11:36am UTC](https://discuss.elastic.co/t/bug-date-histogram-hard-bounds-returns-unknown-field/260825/1 "2021-01-12T11:36:08Z")

</div>

The following snippet returns error reason **[date\_histogram] unknown field [hard\_bounds] did you mean [extended\_bounds]?**

```auto
{ date_histogram:
  { field: 'date',
    calendar_interval: 'day',
    hard_bounds: { min: '2020-11-04', max: '2020-11-09' }
  },
  ...

```

Documentation suggests this feature is available [Date histogram aggregation | Elasticsearch Guide [7.10] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/7.10/search-aggregations-bucket-datehistogram-aggregation.html#date-histogram-scripts)

> ...This histogram also supports the `extended_bounds` ..., and `hard_bounds` that limits the histogram to specified bounds

And github ticket appears to be merged [[7.x] Add hard\_bounds support for histogram field-based histograms (#64246) by imotov · Pull Request #64312 · elastic/elasticsearch · GitHub](https://github.com/elastic/elasticsearch/pull/64312)

Env: Docker container running node:10

```auto
"@elastic/elasticsearch": "^7.10.0"

```

Is this feature not yet released or is there a bug?

---

<div class="post-metadata">

**Author:** ![Ignacio\_Vera](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ignacio_vera/32/36674_2.png) [@Ignacio\_Vera](https://discuss.elastic.co/u/Ignacio_Vera)\
**Post date:** [January 12, 2021, 3:01pm UTC](https://discuss.elastic.co/t/bug-date-histogram-hard-bounds-returns-unknown-field/260825/2 "2021-01-12T15:01:29Z")

</div>

This feature has not been released, it should be available in the upcoming 7.11 release:

> <https://github.com/elastic/elasticsearch/pull/64246>

---

<div class="post-metadata">

**Author:** ![demasie](https://avatars.discourse-cdn.com/v4/letter/d/ba8739/32.png) [@demasie](https://discuss.elastic.co/u/demasie)\
**Post date:** [January 12, 2021, 4:45pm UTC](https://discuss.elastic.co/t/bug-date-histogram-hard-bounds-returns-unknown-field/260825/3 "2021-01-12T16:45:09Z")

</div>

Ah, I missed the label. Very excited and thank you!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [February 9, 2021, 4:45pm UTC](https://discuss.elastic.co/t/bug-date-histogram-hard-bounds-returns-unknown-field/260825/4 "2021-02-09T16:45:11Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
