随笔分类 -  ElasticSearch

摘要:1. 简介 SpringBoot提供了与ElasticSearch的集成的starter包,并封装了ElasticsearchRestTemplate类,还实现了与Java对象与ElasticSearch索引的映射关系,可以采用与JPA相似的Repository接口,来操作ES数据。 需要使用mav 阅读全文
posted @ 2021-02-06 17:49 闲人鹤 阅读(26843) 评论(1) 推荐(4) 编辑
摘要:1. 简介 RestHighLevelClient是官方指定的Java连接ElasticSearch的API。 需要使用maven引用以下依赖: <dependency> <groupId>org.elasticsearch.client</groupId> <artifactId>elastics 阅读全文
posted @ 2021-02-03 15:51 闲人鹤 阅读(1855) 评论(0) 推荐(0) 编辑
摘要:参考资料:Elasticsearch: 权威指南 在线地址:https://www.elastic.co/guide/cn/elasticsearch/guide/current/index.html 注:我用的ElasticSearch版本是6.5 使用的命令部分会和书中的不一样 1. 高阶概念 阅读全文
posted @ 2020-12-21 10:42 闲人鹤 阅读(290) 评论(0) 推荐(0) 编辑
摘要:参考资料:Elasticsearch: 权威指南 在线地址:https://www.elastic.co/guide/cn/elasticsearch/guide/current/index.html 注:我用的ElasticSearch版本是6.5 使用的命令部分会和书中的不一样 1. 结构化搜索 阅读全文
posted @ 2020-12-17 18:22 闲人鹤 阅读(281) 评论(0) 推荐(0) 编辑
摘要:参考资料:Elasticsearch: 权威指南 在线地址:https://www.elastic.co/guide/cn/elasticsearch/guide/current/index.html 1. 查询表达式 查询表达式(Query DSL)是一种非常灵活又富有表现力的 查询语言。 Ela 阅读全文
posted @ 2020-12-08 16:03 闲人鹤 阅读(899) 评论(0) 推荐(0) 编辑
摘要:1. No mapping found for [createDate] in order to sort on org.elasticsearch.action.search.SearchPhaseExecutionException: all shards failed at org.elast 阅读全文
posted @ 2020-06-05 13:33 闲人鹤 阅读(4992) 评论(0) 推荐(0) 编辑
摘要:1. ElasticSearch默认的分词器 ElasticSearch有默认的分词器,是可以直接使用的,但因为默认分词器只对英文单词比较友好,对中文的兼容非常差。 1.1 英文测试 请求地址:http://127.0.0.1:9200/_analyze?analyzer=standard&text 阅读全文
posted @ 2020-04-07 21:53 闲人鹤 阅读(771) 评论(0) 推荐(0) 编辑
摘要:1. 准备工作 需要提前安装好Elasticsearch,访问地址:http://127.0.0.1:9200/ 得到以下结果,得到cluster_name,下面配置使用。 { "name" : "O8GslS3", "cluster_name" : "docker-cluster", "clust 阅读全文
posted @ 2020-04-02 19:02 闲人鹤 阅读(13930) 评论(0) 推荐(0) 编辑
摘要:1. 编写索引内容 节点解释: settings:配置信息 "number_of_replicas": 0 不需要备份(单节点的ElasticSearch使用) "mappings": 映射内容 "dynamic":false 是否动态索引,这里使用的是false,表示索引的固定的,不需要修改。 " 阅读全文
posted @ 2020-04-01 22:06 闲人鹤 阅读(5154) 评论(0) 推荐(0) 编辑
摘要:1. 插件下载 Elasticsearch-head插件比较简单,只要是chrome内核的浏览器都可以安装使用。 官方下载地址:https://chrome.google.com/webstore/detail/elasticsearch-head/ffmkiejjmecolpfloofpjolog 阅读全文
posted @ 2020-04-01 21:13 闲人鹤 阅读(533) 评论(0) 推荐(0) 编辑
摘要:1. 查找Docker Hub上的RabbitMQ镜像 命令:docker search elasticsearch 实例: 2. 拉取官方的镜像 命令:docker pull elasticsearch:7.6.0(7.6.0是版本号,如果不写版本号,默认拉取latest版本) 实例: 3. 查看 阅读全文
posted @ 2020-03-31 21:46 闲人鹤 阅读(1644) 评论(0) 推荐(0) 编辑
摘要:Elasticsearch官网: https://www.elastic.co/products/elasticsearch 一、Linux单节点部署 1. 解压elasticsearch-5.6.1.tar.gz到安装目录下,这里使用的是/opt/module $ tar -zxvf elasti 阅读全文
posted @ 2019-05-17 10:41 闲人鹤 阅读(619) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示