摘要: 酒店数据的索引库结构 #酒店 mapping POST /hotle { "mappings": { "properties": { "id": { "type": "keyword" }, "name":{ "type": "text", "analyzer": "ik_max_word", "c 阅读全文
posted @ 2022-08-21 17:28 JustJavaIt 阅读(58) 评论(0) 推荐(0) 编辑
摘要: Query DSL https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl.html Elasticsearch Clients https://www.elastic.co/guide/en/elastic 阅读全文
posted @ 2022-08-21 17:20 JustJavaIt 阅读(11) 评论(0) 推荐(0) 编辑
摘要: elasticsearch的查询依然是基于JSON风格的DSL来实现的。 DSL查询分类 Elasticsearch提供了基于JSON的DSL(Domain Specific Language)来定义查询。常见的查询类型包括: (1) 查询所有:查询出所有数据,一般测试用。 例如:match_all 阅读全文
posted @ 2022-08-21 17:19 JustJavaIt 阅读(71) 评论(0) 推荐(0) 编辑
摘要: 需求步骤 需求:利用BulkRequest批量将数据库数据导入到索引库中。 步骤如下: 利用mybatis-plus查询酒店数据。 将查询到的酒店数据(Hotel)转换为文档类型数据(HotelDoc)。 利用JavaRestClient中的BulkRequest批处理,实现批量新增文档。 语法说明 阅读全文
posted @ 2022-08-21 16:42 JustJavaIt 阅读(266) 评论(0) 推荐(0) 编辑
摘要: #查询es中的所有索引库GET /_cat/indices?v 阅读全文
posted @ 2022-08-21 15:32 JustJavaIt 阅读(20) 评论(0) 推荐(0) 编辑