1 Star 0 Fork 537

王卓 / springboot-elasticsearch

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

springboot-elasticsearch

一、项目介绍

Springboot2.1.1+elasticsearch6.5.3搭建的企业级搜索平台,支持PB级数据(需要elasticsearch分布式部署),目前已经支持中文分词,检索关键词高亮操作,如果帮到您,麻烦点下Star,谢谢。

另外 Springboot2.1+Solr7.5 搭建的搜索引擎,已经支持文档搜索、数据库搜索、中文分词等。 https://gitee.com/11230595/springboot-solr

二、软件架构

  1. Springboot2.1.1
  2. elasticsearch6.5.3
  3. spring-boot-starter-data-elasticsearch
  4. analysis-ik 6.5.3

三、配置教程

  1. elasticsearch6.5.3
    • 下载
      https://www.elastic.co/cn/downloads/elasticsearch
    • 配置
      解压后,打开 config/elasticsearch.yml,对其中两项配置进行修改
      • cluster.name集群名称,随便填写,或者使用默认的“my-application”,注意,后面Java链接elasticsearch时,需要该配置。
      • network.host如果此不配置此项,其他机器无法链接当前elasticsearch。配置为:(0.0.0.0代表任何IP都可访问)
      • 启动
        Mac/Linux:运行 bin/elasticsearch
        Windows:运行 bin\elasticsearch.bat
  2. analysis-ik 6.5.3
    • 安装执行命令:
      bin/elasticsearch-plugin install https://github.com/medcl/elasticsearch-analysis-ik/releases/download/v6.5.3/elasticsearch-analysis-ik-6.5.3.zip
  3. essearch
    标准springboot项目,导入IDE运行即可。

四、essearch配置说明

  1. 修改application.properties->spring.data.elasticsearch.cluster-nodes elasticsearch地址
  2. 修改application.properties->spring.data.elasticsearch.cluster-name 集群名称,和上面配置的相对应
  3. 各种操作方式,请参考:/src/test/java/com/zhou/essearch/EssearchApplicationTests.java测试类
  4. 端口,文根等其他配置请可自行配置

五、搜索接口返回数据截图

  • 分页搜索接口
    image
  • 普通搜索接口
    image

六、补充

  1. 数据库数据同步,可自行安装插件。
  2. 如需mq、接口方式同步数据,请查看项目中的save接口模块。

七、QQ群:83402555

八、关注公众号(公众号中有安装es的步骤和很多实用文章)

image

MIT License Copyright (c) 2020 王卓 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

Springboot2.1.1+elasticsearch6.5.3搭建的企业级搜索平台,支持PB级数据(elasticsearch分布式部署),目前已经支持中文分词,检索关键词高亮操作,如果帮到您,麻烦点下Star,谢谢。 展开 收起
Java
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Java
1
https://gitee.com/w_zhuo/springboot-elasticsearch.git
git@gitee.com:w_zhuo/springboot-elasticsearch.git
w_zhuo
springboot-elasticsearch
springboot-elasticsearch
master

搜索帮助