摘要: 首先得需要安装elasticsearch pip install elasticsearch from elasticsearch import ElasticSearch es = ElasticSearch() 创建索引 创建索引,索引的名字是my-index,如果已经存在了,就返回个400,这 阅读全文
posted @ 2020-08-21 15:24 YF-海纳百川 阅读(1155) 评论(0) 推荐(1) 编辑
摘要: 转译:(https://www.elastic.co/guide/en/elasticsearch/guide/current/_finding_exact_values.html#_finding_exact_values) 当进行精确值查找时, 我们会使用过滤器(filters)。过滤器很重要, 阅读全文
posted @ 2020-08-21 14:22 YF-海纳百川 阅读(1417) 评论(0) 推荐(0) 编辑
摘要: es官网原文:https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-index_.html#index-refresh ES在查询过程中比较多遇到符合查询,既需要多个字段过滤也需要特殊情况处理,本文简单介绍几种查询组 阅读全文
posted @ 2020-08-21 13:53 YF-海纳百川 阅读(458) 评论(0) 推荐(0) 编辑
摘要: elasticsearch7.x取消了type(类型的概念)对应数据库表的概念,指定不指定都可以 1、创建索引和文档 PUT 索引名 { "settings": { "number_of_shards": 1, "number_of_replicas": 0 } } 创建一个索引 PUT /索引名/ 阅读全文
posted @ 2020-08-21 13:40 YF-海纳百川 阅读(578) 评论(0) 推荐(0) 编辑
摘要: 转载,原文地址:http://mageedu.blog.51cto.com/4265610/1714522?utm_source=tuicool&utm_medium=referral 下面进入正题。今天的分享共分为如下几个组成部分。不过,如果时间上来不及,可能只会聊前两个而不及其余。 1、搜索引擎 阅读全文
posted @ 2020-08-21 10:57 YF-海纳百川 阅读(748) 评论(0) 推荐(0) 编辑