curl -XGET 9.111.139.77:9200/_cat/indices

curl -XGET 127.0.0.1:9200/_cat/indices



Python  访问 ES

#!usr/bin/Python
# -*- coding:utf-8 -*-

#在以前的培训中简单的了解了下 Lucene 和 ElasticSearch 以及 Solr ,在工作中没有用ES 存储日志数据

#pip install elasticsearch

from elasticsearch import Elasticsearch
#set the es connection
es = Elasticsearch([{'host':'9.111.139.77','port':9200}])

print es.search(index='datastage_run*', q='_type:"logsum"')
print es.count(index='datastage_run*', q='_type:"logsum"')

相关文章:

  • 2021-07-29
  • 2022-03-11
  • 2022-12-23
  • 2022-03-08
  • 2021-11-21
  • 2021-12-04
  • 2021-11-06
  • 2021-08-29
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-12-05
相关资源
相似解决方案