# No mapping found for \[days\] in order to sort on

**URL:** <https://discuss.elastic.co/t/no-mapping-found-for-days-in-order-to-sort-on/238107>\
**Category:** Kibana\
**Created:** [June 22, 2020, 2:57pm UTC](https://discuss.elastic.co/t/no-mapping-found-for-days-in-order-to-sort-on/238107 "2020-06-22T14:57:38Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Incauto](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/incauto/32/60149_2.png) [@Incauto](https://discuss.elastic.co/u/Incauto)\
**Post date:** [June 22, 2020, 2:57pm UTC](https://discuss.elastic.co/t/no-mapping-found-for-days-in-order-to-sort-on/238107/1 "2020-06-22T14:57:39Z")

</div>

At the beggining of this month I added a template and a new numeric field for an index, so the field doesnt exists in the previous months, when displaying an horizontal bar visualizations (even if I query the last hour or day) i get this error on the shards that the field doesnt exists.

```auto
No mapping found for [days] in order to sort on

```

I have tried to add a filter on the visualization to to force the query to a specific date range, but still trows me the error

![image](https://us1.discourse-cdn.com/elastic/original/3X/5/1/515e4f87f2c00bc87fdb53cc2a9fe56f549d20e9.png)

Is there something I cant do to get rid of this error in the visualization?

---

<div class="post-metadata">

**Author:** ![timroes](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timroes/32/19712_2.png) [@timroes](https://discuss.elastic.co/u/timroes)\
**Post date:** [June 22, 2020, 4:34pm UTC](https://discuss.elastic.co/t/no-mapping-found-for-days-in-order-to-sort-on/238107/2 "2020-06-22T16:34:53Z")

</div>

Hi,

if you add a field, you need to go to "Management" \> "Index Patterns" and use the "refresh" button on the rop right to refresh the field list for that index pattern. That way you can make Kibana aware of the new field.

Cheers,  
Tim

---

<div class="post-metadata">

**Author:** ![Incauto](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/incauto/32/60149_2.png) [@Incauto](https://discuss.elastic.co/u/Incauto)\
**Post date:** [June 22, 2020, 5:20pm UTC](https://discuss.elastic.co/t/no-mapping-found-for-days-in-order-to-sort-on/238107/3 "2020-06-22T17:20:21Z")

</div>

Hi, thanks @timroes, I've already done that, the shards that give me error are from the previous months , where the field didnt exist

---

<div class="post-metadata">

**Author:** ![timroes](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timroes/32/19712_2.png) [@timroes](https://discuss.elastic.co/u/timroes)\
**Post date:** [June 23, 2020, 2:47pm UTC](https://discuss.elastic.co/t/no-mapping-found-for-days-in-order-to-sort-on/238107/4 "2020-06-23T14:47:24Z")

</div>

Could you look in the inspector (top menu, if you're in discover) when sending that request (or the shard error dialog, when on newer Kibana versions), and get the request that's actually send to Elasticsearch and paste it here?

---

<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:** [July 21, 2020, 2:47pm UTC](https://discuss.elastic.co/t/no-mapping-found-for-days-in-order-to-sort-on/238107/5 "2020-07-21T14:47:29Z")

</div>

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