- Elasticsearch 7.0 Cookbook(Fourth Edition)
- Alberto Paro
- 36字
- 2021-06-24 14:52:04
How to do it...
We can extend the previous mapping by adding document-related settings, as follows:
PUT test/_mapping
{
"dynamic_date_formats":["yyyy-MM-dd", "dd-MM-yyyy"],\
"date_detection":true,
"numeric_detection":true,
"dynamic_templates":[
{"template1":{
"match":"*",
"match_mapping_type":"long",
"mapping":{"type":" {dynamic_type}", "store":true}
}} ],
"properties" : {...}
}