当前位置:网站首页>RestHighLevelClient获取某个索引的mapping
RestHighLevelClient获取某个索引的mapping
2022-07-03 06:50:00 【绅士jiejie】
参考代码:
//构建请求
GetMappingsRequest request = new GetMappingsRequest().indices("索引名");
//使用RestHighLevelClient发起请求
GetMappingsResponse response = restHighLevelClient.indices().getMapping(request, RequestOptions.DEFAULT);
获取到GetMappingsResponse这个响应数据后,如何处理获取其中的数据,参考代码:
Map<String, MappingMetaData> mappingMap = response.mappings();
MappingMetaData indexMapping = mappingMap.get("索引名");
Map<String, Object> mapping = indexMapping.sourceAsMap();
以上就是提供个使用的参考,提高点效率,没什么原理,通过以上代码,大致能够获取到所需的数据了,接下来要怎么处理,打个断点,看下返回数据的结构,按需取就可以了。
边栏推荐
- Interface test weather API
- Use @data in Lombok to simplify entity class code
- Jenkins
- 【code】if (list != null && list.size() > 0)优化,集合判空实现方式
- Climb movie paradise 2021 hot
- Docker advanced learning (container data volume, MySQL installation, dockerfile)
- Code management tools
- Getting started with pytest
- 熊市里的大机构压力倍增,灰度、Tether、微策略等巨鲸会不会成为'巨雷'?
- Scripy learning
猜你喜欢

New knowledge! The virtual machine network card causes your DNS resolution to slow down

golang操作redis:写入、读取hash类型数据

Read blog type data from mysql, Chinese garbled code - solved

论文笔记 VSALM 文献综述《A Comprehensive Survey of Visual SLAM Algorithms》

Example of joint use of ros+pytoch (semantic segmentation)

“我为开源打榜狂”第一周榜单公布,160位开发者上榜

Summary of the design and implementation of the weapon system similar to the paladin of vitality

这两种驱蚊成份对宝宝有害,有宝宝的家庭,选购驱蚊产品要注意

Paper notes vsalm literature review "a comprehensive survey of visual slam algorithms"

每日刷題記錄 (十一)
随机推荐
error C2017: 非法的转义序列
堆排序和优先队列
ROS+Pytorch的联合使用示例(语义分割)
Simple password lock
2022 - 06 - 23 vgmp - OSPF - Inter - Domain Security Policy - nat Policy (Update)
Floating menu operation
【code】if (list != null && list.size() > 0)优化,集合判空实现方式
The essence of interview
Operation principle of lua on C: Foundation
Machine learning | simple but feature standardization methods that can improve the effect of the model (comparison and analysis of robustscaler, minmaxscaler, standardscaler)
Software testing assignment - day 3
DBNet:具有可微分二值化的实时场景文本检测
【无标题】8 简易版通讯录
[classes and objects] explain classes and objects in simple terms
Search engine Bing Bing advanced search skills
La loi des 10 000 heures ne fait pas de vous un maître de programmation, mais au moins un bon point de départ
2022-06-23 VGMP-OSPF-域间安全策略-NAT策略(更新中)
Yolov3 learning notes
How can the server set up multiple interfaces and install IIS? Tiantian gives you the answer!
MATLAB如何修改默认设置