[英]ElasticSearch - Kibana - Not able to get Index Pattern with Python
I'm creating a python script in order to get access to my Index Patterns that I create on Kibana. 我正在创建一个python脚本,以访问在Kibana上创建的索引模式。 First, I am trying to list that indexes using:
首先,我尝试使用以下方式列出该索引:
for index in es.indices.get('*'):
print index
And if I go to Kibana on Management -> Kibana -> Index Patterns I am seeing the following indexes: 如果我在管理上转到Kibana-> Kibana->索引模式,则会看到以下索引:
However when I run my previous script I am only able to see the index that I create using this script: 但是,当我运行上一个脚本时,我只能看到使用此脚本创建的索引:
from datetime import datetime
from elasticsearch import Elasticsearch
es = Elasticsearch()
doc = {
'author': 'John',
'text': 'Elasticsearch: good tool',
'timestamp': datetime.now(),
}
res = es.index(index="test-index", doc_type='tweet', id=1, body=doc)
print(res['result'])
My question is: When I call "es.indices" I am not accessing to the Indexes from Kibana? 我的问题是:当我调用“ es.indices”时,我是否无法从Kibana访问索引? Why I cannot see my indexes patterns using elasticsearch library in Python?
为什么我无法在Python中使用Elasticsearch库看到索引模式?
Thanks! 谢谢!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.