elasticsearch,Python,elasticsearch" /> elasticsearch,Python,elasticsearch" />

尝试从elasticsearch python检查索引模板

尝试从elasticsearch python检查索引模板,python,elasticsearch,Python,elasticsearch,我试图通过python elasticsearch API查看索引模板的内容 我这样做: es.get_template("_template/my_template") 但这就是我得到的一切: {'_id': '_template/my_template', 'found': True, 'lang': 'mustache', 'template': 'my_template*'} 如何取回完整的模板内容?es.get\u template()将检索搜索模板而不是索引模板 您需要像这

我试图通过python elasticsearch API查看索引模板的内容

我这样做:

es.get_template("_template/my_template")
但这就是我得到的一切:

{'_id': '_template/my_template',
 'found': True,
 'lang': 'mustache',
 'template': 'my_template*'}
如何取回完整的模板内容?

es.get\u template()
将检索搜索模板而不是索引模板

您需要像这样使用
es.index
客户端:

es.indices.get_template('my_template')

您是否尝试过不使用
\u template/
前缀,即仅使用
es.get\u template(“我的模板”)
?是的,但是它根本找不到模板。它是索引模板还是搜索模板?因为里面的
小胡子
让我觉得它是一个搜索模板。