1
A
回答
2
在索引模板中,只需将映射定义为动态模板即可。 例如:
PUT /_template/template_1
{
"template": "yourindex*",
"mappings": {
"my_type": {
"dynamic_templates": [
{your dynamic templates ...}
]
}
}
}
1
你可以做这样的事情:
PUT /_template/my_template
{
"template": "name-*",
"mappings": {
"my_type": {
"dynamic_templates": [
{
"rule1": {
"match": "field*",
"mapping": {
"type": "string",
"index": "analyzed"
}
}
},
{
"rule2": {
"match": "another*",
"mapping": {
"type": "integer"
}
}
}
],
"properties": {
"field": {
"type": "string"
}
}
}
}
}
相关问题
- 1. 将OpenGL ES模板和实用程序模板结合起来
- 2. 将jQuery Globalize与underscore.js模板结合起来?
- 3. 与动态模板
- 4. 索引模板
- 5. 角JS指令动态模板结合
- 6. MongoDB Map-Reduce将文档与动态模式结合起来
- 7. AngularJS模板+引导模态
- 8. 动态模板
- 9. 聚合物0.5自动结合模板“模板结合”事件1.0当量
- 10. 结合策略类 - 模板模板参数和变量模板
- 11. 聚合物2动态合并模板
- 12. 模板与结构
- 13. 包括引导模板模板与模板标签
- 14. Django 1.9.3 - 如何将HTML模板传递给索引模板
- 15. NodeJS - EJS模板引擎中的内部动态模板
- 16. Backbone.js与生态模板:如何在模板中包含模板?
- 17. 动态模板css(模板框架)的mysql结构
- 18. 将自己引用为模板模板参数的模板类?
- 19. 动态值模板
- 20. POI动态模板
- 21. Angular2动态模板
- 22. 动态ListView模板
- 23. 动态模板URL
- 24. KnockoutJS动态模板
- 25. 角动态模板
- 26. Elasticsearch动态模板
- 27. 动态模板WPF
- 28. elasticsearch动态模板
- 29. 动态angularjs模板
- 30. 将html模板与php代码混合:php html模板