![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
ES
文章平均质量分 83
佳佳起航
从零开始
展开
-
pyhton 操作Elasticsearch
1、python连接elasticsearch#coding=utf-8 from elasticsearch import Elasticsearch as ES es=ES('192.168.1.38',port=9200)2、创建索引##1、初始化索引 (mapping 相当于mysql的建表语句)# coding=utf-8 from elasticsearch import Elasti原创 2017-12-12 16:47:49 · 225 阅读 · 0 评论 -
python+ES6.0查询(一)
1、查询所有的索引名称列表index_name=es.indices.get_alias().keys() print index_name [u'awtools', u'awlogs']2、查询所有索引的字段类型map_type=es.indices.get_mapping() print map_type {u'awtools': {u'mappings': {u'as_org': {u'pro原创 2017-12-18 11:32:01 · 1092 阅读 · 0 评论 -
pyhton+ES6.0数据查询(二)
1、查询所有的信息# 查询所有数据数据中的前5条 body = { "query": { 'match_all': {} }, # "size": 50,#不填写的话,默认为10 } res = es.search(index='awlogs', doc_type='location_as_domain_log', body=body) soucelist=原创 2017-12-18 18:49:52 · 319 阅读 · 0 评论 -
ES6.0 Header插件的安装
1、下载nodejs 1、去官网下载下载nodejs https://nodejs.org/en/download/ 2、安装nodejs 由于下载下来的是xz文件,node-v8.9.3-linux-x64.tar.xz,先安装xz工具 sudo apt-get install xz 然后解压文件 xz node* -d tar xvf node*原创 2017-12-14 12:20:01 · 7283 阅读 · 1 评论