# How to set ignore\_above globally for all dynamically created fileds

**URL:** <https://discuss.elastic.co/t/how-to-set-ignore-above-globally-for-all-dynamically-created-fileds/210617>\
**Category:** Elasticsearch\
**Created:** [December 5, 2019, 4:31am UTC](https://discuss.elastic.co/t/how-to-set-ignore-above-globally-for-all-dynamically-created-fileds/210617 "2019-12-05T04:31:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![abduraoof](https://avatars.discourse-cdn.com/v4/letter/a/87869e/32.png) [@abduraoof](https://discuss.elastic.co/u/abduraoof)\
**Post date:** [December 5, 2019, 4:31am UTC](https://discuss.elastic.co/t/how-to-set-ignore-above-globally-for-all-dynamically-created-fileds/210617/1 "2019-12-05T04:31:18Z")

</div>

Hi,

```
I have an index created by dynamically. Fields are also crated by dynamically.

```

I have an issue related to aggregation. some filed value greater than 256 characters, that values not getting aggregated.

eg : mapping

"field1" : {  
"fields" : {  
"keyword" : {  
"ignore\_above" : 256,  
"type" : "keyword"  
}  
},  
"type" : "text"  
},  
"field2" : {  
"type" : "text",  
"fields" : {  
"keyword" : {  
"type" : "keyword",  
"ignore\_above" : 256  
}  
}  
},

I changed all fields ignore\_above from template

"mappings": {  
"dynamic\_templates": [  
{  
"strings": {  
"match\_mapping\_type": "string",  
"mapping": {  
"type" : "keyword",  
"ignore\_above" : 500,  
"index": true  
}  
}  
}  
]  
}

Its works, but aggregations are not working after change ignore\_above

please help

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [December 6, 2019, 12:13pm UTC](https://discuss.elastic.co/t/how-to-set-ignore-above-globally-for-all-dynamically-created-fileds/210617/2 "2019-12-06T12:13:55Z")

</div>

can you create a reproducible example, including the dynamic mapping, the index creation, an indexed document and a sample search query? otherwise it will be hard to follow your steps.

---

<div class="post-metadata">

**Author:** ![abduraoof](https://avatars.discourse-cdn.com/v4/letter/a/87869e/32.png) [@abduraoof](https://discuss.elastic.co/u/abduraoof)\
**Post date:** [December 6, 2019, 12:26pm UTC](https://discuss.elastic.co/t/how-to-set-ignore-above-globally-for-all-dynamically-created-fileds/210617/3 "2019-12-06T12:26:14Z")

</div>

Thanks @spinscale  
Issue fixed now, Created a mapping in template. ( Previously didn't create any mappings, Default mapping was created )

---

<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:** [January 3, 2020, 12:26pm UTC](https://discuss.elastic.co/t/how-to-set-ignore-above-globally-for-all-dynamically-created-fileds/210617/4 "2020-01-03T12:26:16Z")

</div>

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