黑马 Elasticsearch 全套教程,黑马旅游网案例
一、参考资料
【黑马Elasticsearch全套教程,含DSL查询语法、数据聚合、ES集合,最后配有黑马旅游网案例】 https://www.bilibili.com/video/BV1b8411Z7w5/?p=14\&share_source=copy_web\&vd_source=855891859b2dc554eace9de3f28b4528
二、笔记总结
14、RestClient 操作数索引库-导入 demo






15、hotel 数据结构分析










json
PUT /hotel
{
"mappings": {
"properties": {
"id": {
"type": "keyword"
},
"name":{
"type": "text",
"analyzer": "ik_max_word",
"copy_to": "all"
},
"address":{
"type": "keyword",
"index": false
},
"price":{
"type": "integer"
},
"score":{
"type": "integer"
},
"brand":{
"type": "keyword",
"copy_to": "all"
},
"city":{
"type": "keyword",
"copy_to": "all"
},
"starName":{
"type": "keyword"
},
"business":{
"type": "keyword"
},
"location":{
"type": "geo_point"
},
"pic":{
"type": "keyword",
"index": false
},
"all":{
"type": "text",
"analyzer": "ik_max_word"
}
}
}
}
16、初始化 RestClient






17、创建索引库




18、删除和判断索引库



19、新增文档





20、查询文档


21、更新文档


22、删除文档

23、批量导入文档



三、笔记总结
12、RestClient 查询文档-快速入门




13、match、term、range、bool 查询




14、排序和分页

15、高亮显示








16、黑马旅游案例-搜索、分页












17、条件过滤




18、我附近的酒店




19、广告置顶



