摘要: 原文地址: https://www.cnblogs.com/zklidd/p/6149120.html 0、故事引入 无意中看到了ES的mapping中有store字段,作为一个ES菜鸡,有必要对这个字段进行下笔记。 1、_source _source字段我在们进行检索时相当重要, ES默认检索只会 阅读全文
posted @ 2019-09-23 16:53 睡着的糖葫芦 阅读(739) 评论(0) 推荐(0) 编辑
摘要: #记录聚合查询方法 from elasticsearch import Elasticsearches = Elasticsearch(['xx.xx.xx.xx:9200'])#获取最小的年龄res = es.search(index='test6', body = { "query": { "m 阅读全文
posted @ 2019-09-23 16:34 睡着的糖葫芦 阅读(3698) 评论(1) 推荐(0) 编辑
摘要: #记录es查询等方法 #清楚数据 curl -XDELETE http://xx.xx.xx.xx:9200/test6 #初始化数据 curl -H "Content-Type: application/json" -XPUT 'http://xx.xx.xx.xx:9200/test6/user 阅读全文
posted @ 2019-09-23 16:32 睡着的糖葫芦 阅读(13700) 评论(1) 推荐(1) 编辑
摘要: #记录管理索引等方法from elasticsearch import Elasticsearches = Elasticsearch(['xx.xx.xx.xx:9200'])#获取文档内容res = es.get_source(index="test", id='-R7AQ20BIdlTveXF 阅读全文
posted @ 2019-09-23 16:28 睡着的糖葫芦 阅读(8910) 评论(1) 推荐(0) 编辑