項目效果預覽:
安裝成功的效果圖:
kibana安裝:
ES使用的是倒排索引
參考:https://www.yuque.com/gaohanghang/vx5cb2/aa576g#HuZ1N
《Springboot + ElasticSearch 構建博客檢索系統》
視頻地址:https://www.imooc.com/learn/1161
代碼地址:https://github.com/gaohanghang/springboot-blog-es
我所使用的 elasticsearch、logstash、kibana的版本均為 7.5.0 最新版
簡介:從實際需求分析開始,打造個人博客檢索系統。內容涵蓋 ES安裝、ES基本概念和數據類型、Mysql 到 ES 數據同步、SpringBoot 操作 ES。通過本課,讓學員對ES有一個初步認識,理解ES的一些適用場景,以及如何使用springboot來同ES進行交互。
第1章 課程介紹
1-1 課程導學
- 可以反復看
- 上手做
- 學會應用
第2章 初識 ElassticSearch
2-1 ElasticSearch 概念和適用場景
2-2 ElasticSearch 數據類型,和關系型數據庫對比
2-3 安裝 ES、postman、Kibana
2-4 演示 postman、kibana對ES的交互
PostMan
Get 查看所有索引 localhost:9200/_all PUT 創建索引-test localhost:9200/test DEL 刪除索引-test localhost:9200/test PUT 創建索引-person-1 localhost:9200/person PUT 新增數據-person-1 localhost:9200/person/_doc/1 { "first_name" : "John", "last_name" : "Smith", "age" : 25, "about" : "I love to go rock climbing", "interests" : [ "sports", "music" ] } PUT 新增數據-person-2 localhost:9200/person/_doc/2 { "first_name" : "Eric", "last_name" : "Smith", "age" : 23, "about" : "I love basketball", "interests" : [ "sports", "reading" ] } GET 搜索數據-person-id localhost:9200/person/_doc/1 GET 搜索數據-person-name localhost:9200/person/_doc/_search?q=first_name:john { "took": 56, "timed_out": false, "_shards": { "total": 1, "successful": 1, "skipped": 0, "failed": 0 }, "hits": { "total": { "value": 1, "relation": "eq" }, "max_score":