Hello,
I'm storing data by language in multiple indexes, one English index and multiple foreign languages. I store the same document in multiple indexes and I run aggregations across them, but I only want to aggregate the values from the English index.
Within my version 2.x mapping for my English index I have the following definition for a countryCode
"countryCode": {
"type": "string",
"index": "not_analyzed"
}
For all foreign languages (French, German etc) I have the following mapping
"countryCode": {
"type": "string",
"index": "no"
},
When I run aggregations on all of the indexes only the countryCode stored within the English index is evaluated (this is behaviour I want). Considering countryCode is a keyword, how do map this on version 5.0?
I tried this mapping for the foreign language documents:
"countryCode": {
"type": "keyword",
"index": false
},
But I receive the following error in the results:
"caused_by": {
"type": "illegal_argument_exception",
"reason": "Cannot search on field [countryCode] since it is not indexed."
}
So in summation: I want to store the countryCode on all foreign language indexes but I don't want this evaluated when I am running aggregations.