Ignore keyword field when performing aggregations in certain indexes


(Markwalsh Liverpool) #1

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


(Markwalsh Liverpool) #2

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?


(system) #3

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