构建博客网站检索系统(Springboot + ElasticSearch+Tkmybatis+vue)

项目简介:

基于框架 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>

项目源码:

https://github.com/chenping-1993/elasticsearch

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章