python+ES6.0查询(一)
来源:互联网 发布:淘宝有卖假的医院证明 编辑:程序博客网 时间:2024/06/06 02:35
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'properties': {u'orgname': {u'type': u'text'}, u'country': {u'type': u'text'}, u'maxip': {u'type': u'long'}, u'asnumber': {u'type': u'integer'}, u'asname': {u'type': u'text'}, u'asnumber_as': {u'fields': {u'keyword': {u'ignore_above': 256, u'type': u'keyword'}}, u'type': u'text'}, u'minip': {u'type': u'long'}, u'type': {u'type': u'text'}}}}}, u'awlogs': {u'mappings': {u'location_as_domain_log': {u'properties': {u'testip': {u'fields': {u'keyword': {u'ignore_above': 256, u'type': u'keyword'}}, u'type': u'text'}, u'code': {u'type': u'long'}, u'agent_info': {u'fields': {u'keyword': {u'ignore_above': 256, u'type': u'keyword'}}, u'type': u'text'}, u'flag': {u'type': u'long'}, u'osname': {u'fields': {u'keyword': {u'ignore_above': 256, u'type': u'keyword'}}, u'type': u'text'}, u'testurl': {u'fields': {u'keyword': {u'ignore_above': 256, u'type': u'keyword'}}, u'type': u'text'}, u'browser_version': {u'fields': {u'keyword': {u'ignore_above': 256, u'type': u'keyword'}}, u'type': u'text'}, u'date': {u'fields': {u'keyword': {u'ignore_above': 256, u'type': u'keyword'}}, u'type': u'text'}, u'clientip': {u'fields': {u'keyword': {u'ignore_above': 256, u'type': u'keyword'}}, u'type': u'text'}, u'osversion': {u'fields': {u'keyword': {u'ignore_above': 256, u'type': u'keyword'}}, u'type': u'text'}, u'type': {u'fields': {u'keyword': {u'ignore_above': 256, u'type': u'keyword'}}, u'type': u'text'}, u'browser': {u'fields': {u'keyword': {u'ignore_above': 256, u'type': u'keyword'}}, u'type': u'text'}}}}}}
3、查询单个索引的字段类型
map_awlogs_type=es.indices.get_mapping(index='awlogs')print map_awlogs_type{u'awlogs': {u'mappings': {u'location_as_domain_log': {u'properties': {u'testip': {u'fields': {u'keyword': {u'ignore_above': 256, u'type': u'keyword'}}, u'type': u'text'}, u'code': {u'type': u'long'}, u'agent_info': {u'fields': {u'keyword': {u'ignore_above': 256, u'type': u'keyword'}}, u'type': u'text'}, u'flag': {u'type': u'long'}, u'osname': {u'fields': {u'keyword': {u'ignore_above': 256, u'type': u'keyword'}}, u'type': u'text'}, u'testurl': {u'fields': {u'keyword': {u'ignore_above': 256, u'type': u'keyword'}}, u'type': u'text'}, u'browser_version': {u'fields': {u'keyword': {u'ignore_above': 256, u'type': u'keyword'}}, u'type': u'text'}, u'date': {u'fields': {u'keyword': {u'ignore_above': 256, u'type': u'keyword'}}, u'type': u'text'}, u'clientip': {u'fields': {u'keyword': {u'ignore_above': 256, u'type': u'keyword'}}, u'type': u'text'}, u'osversion': {u'fields': {u'keyword': {u'ignore_above': 256, u'type': u'keyword'}}, u'type': u'text'}, u'type': {u'fields': {u'keyword': {u'ignore_above': 256, u'type': u'keyword'}}, u'type': u'text'}, u'browser': {u'fields': {u'keyword': {u'ignore_above': 256, u'type': u'keyword'}}, u'type': u'text'}}}}}}
阅读全文
0 0
- python+ES6.0查询(一)
- es6(一)
- ES6(一)
- es6<一>
- pyhton+ES6.0数据查询(二)
- ES6笔记(一)
- es6学习一
- [Wondgirl]ECMAScript6(ES6)(一)
- ES6语法摘要一
- ES6深入浅出(一)
- ES6知识库汇总一
- ES6 基础教程(一)
- ES6手记(一)
- ES6学习(一)
- ES6基础学习(一)
- ES6入门(一)
- 全面认识ES6(一)
- ES6入门(一)
- java awt生成图片消除锯齿
- go源码编译安装包,下载不了问题!
- Could not find class 'android.graphics.drawable.RippleDrawable', referenced from method android.supp
- linux查看文件内容
- Serial Programming HOWTO——Linux 串口编程HOWTO
- python+ES6.0查询(一)
- 4-2 电子时钟中的运算符重载
- Hive jdbc 连接 Oracle数据库
- [html5]表格拖动
- php 语法 常量 变量 数据类型详解
- 数据表设计常用规范
- 无敌全web.xml配置文件元素详解
- generatorConfiguration 配置
- web压测工具 apache-Jmeter安装,基于win10