项目简介:
基于框架 Springboot + ElasticSearch+Tkmybatis+vue 实现博客网站检索系统
效果展示:
es查询时间39

mysql查询时间247:

分词:如查询‘springboot描述’,分成springboot、描述(所有包含'springboot'或者'描述'的数据都被查询出来)
项目资源依赖:
ElasticSearch:elasticsearch-6.3.2 https://www.elastic.co/cn/downloads/elasticsearch
Logstash: logstash-6.3.2(同步mysql数据库数据)https://www.elastic.co/cn/downloads/logstash
ik分词器:elasticsearch-analysis-ik-6.3.2(智能分词搜索)https://github.com/medcl/elasticsearch-analysis-ik
项目结构:

maven依赖:
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>2.1.1</version>
</dependency>
<dependency>
<groupId>tk.mybatis</groupId>
<artifactId>mapper-spring-boot-starter</artifactId>
<version>2.1.5</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-elasticsearch</artifactId>
</dependency>
</dependencies>

本项目使用SpringBoot、ElasticSearch、Tkmybatis及Vue搭建博客检索系统,通过Logstash同步MySQL数据,利用ik分词器提升搜索效率。演示显示,ES查询速度远超MySQL。
6768





