# Ignore keyword field when performing aggregations in certain indexes

**URL:** <https://discuss.elastic.co/t/ignore-keyword-field-when-performing-aggregations-in-certain-indexes/87224>\
**Category:** Elasticsearch\
**Created:** [May 26, 2017, 9:52am UTC](https://discuss.elastic.co/t/ignore-keyword-field-when-performing-aggregations-in-certain-indexes/87224 "2017-05-26T09:52:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![markwalsh-liverpool](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/markwalsh-liverpool/32/8927_2.png) [@markwalsh-liverpool](https://discuss.elastic.co/u/markwalsh-liverpool)\
**Post date:** [May 26, 2017, 9:52am UTC](https://discuss.elastic.co/t/ignore-keyword-field-when-performing-aggregations-in-certain-indexes/87224/1 "2017-05-26T09:52:16Z")

</div>

Is it possible to exclude certain fields from particular indexes when performing aggregations?

I've got a multi language indexes which I search across. I only wish to aggregate on my "english" index on the following field

```
  "languageCode": {
                  "type": "keyword",
                  "index": true
               },

```

For my other languages indexes is it possible to exclude this languageCode field from aggregations?

In version 2, I just used used to use this mapping in non-English indexes

```
"languageCode": {
                  "type": "string",
                  "index": "no"
               },

```

But this is no longer an option

---

<div class="post-metadata">

**Author:** ![markwalsh-liverpool](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/markwalsh-liverpool/32/8927_2.png) [@markwalsh-liverpool](https://discuss.elastic.co/u/markwalsh-liverpool)\
**Post date:** [May 26, 2017, 10:19am UTC](https://discuss.elastic.co/t/ignore-keyword-field-when-performing-aggregations-in-certain-indexes/87224/2 "2017-05-26T10:19:41Z")

</div>

I managed to ignore the fields in non-English indexes by configuring it like so:

```
   "languageCode": {
                  "type": "keyword",
                  "ignore_above": 0
               },

```

Is it the correct way of doing this or is there a different method?

---

<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:** [June 23, 2017, 10:19am UTC](https://discuss.elastic.co/t/ignore-keyword-field-when-performing-aggregations-in-certain-indexes/87224/3 "2017-06-23T10:19:52Z")

</div>

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