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. 與動態模板
- 3. 動態模板
- 4. 聚合物0.5自動結合模板「模板結合」事件1.0當量
- 5. 模板與結構
- 6. Django 1.9.3 - 如何將HTML模板傳遞給索引模板
- 7. 將自己引用爲模板模板參數的模板類?
- 8. 動態ListView模板
- 9. Elasticsearch動態模板
- 10. POI動態模板
- 11. Angular2動態模板
- 12. 動態模板WPF
- 13. 動態模板URL
- 14. KnockoutJS動態模板
- 15. 角動態模板
- 16. elasticsearch動態模板
- 17. 將html模板與php代碼混合:php html模板
- 18. C#使用索引器與模板
- 19. Mvc UrlHelper與JQuery模板結合使用
- 20. C++:結合常數與模板參數
- 21. 流星動態模板不起作用
- 22. Elasticsearch更新索引模板
- 23. 多索引logstash模板
- 24. SQL模板引擎將SQL與動態語言混合? (類似於Ruby的erb)
- 25. 將別名添加到模板索引?
- 26. 刪除彈性搜索動態模板
- 27. 「類模板」 與 「模板類」
- 28. 如何將WordPress模板與CodeIgniter整合
- 29. 字符串與模板,動態變量
- 30. 動態頁面佈局與Smarty模板