How to set ignore_above globally for all dynamically created fileds

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

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.

1 Like

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

1 Like

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