In our application we add new documents which can have new unknown properties.
Is it possible to set default mapping to "keyword" for dynamically added new properties in Elasticsearch?
In our application we add new documents which can have new unknown properties.
Is it possible to set default mapping to "keyword" for dynamically added new properties in Elasticsearch?
@gitterhh
You can do this by defining dynamic template
{
"mappings": {
"dynamic_templates": [
{
"strings": {
"match_mapping_type": "string",
"mapping": {
"type": "keyword"
}
}
}
]
}
}
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
© 2020. All Rights Reserved - Elasticsearch
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant logo are trademarks of the Apache Software Foundation in the United States and/or other countries.