項目簡介:
基於框架 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>