当前位置:网站首页>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();
以上就是提供个使用的参考,提高点效率,没什么原理,通过以上代码,大致能够获取到所需的数据了,接下来要怎么处理,打个断点,看下返回数据的结构,按需取就可以了。
边栏推荐
- Shell conditional statement
- 【LeetCode】Day93-两个数组的交集 II
- 论文笔记 VSALM 文献综述《A Comprehensive Survey of Visual SLAM Algorithms》
- opencv鼠标键盘事件
- 【无标题】8 简易版通讯录
- Paper notes vsalm literature review "a comprehensive survey of visual slam algorithms"
- IC_ EDA_ All virtual machine (rich Edition): questasim, vivado, VCs, Verdi, DC, Pt, spyglass, icc2, synthesize, innovative, ic617, mmsim, process library
- The pressure of large institutions in the bear market has doubled. Will the giant whales such as gray scale, tether and micro strategy become 'giant thunder'?
- How can the server set up multiple interfaces and install IIS? Tiantian gives you the answer!
- 2022-06-23 vgmp OSPF inter domain security policy NAT policy (under update)
猜你喜欢

Important knowledge points of redis

2022-06-23 VGMP-OSPF-域间安全策略-NAT策略(更新中)

Operation principle of lua on C: Foundation

Ruoyi interface permission verification

EasyExcel

10万奖金被瓜分,快来认识这位上榜者里的“乘风破浪的姐姐”

【开源项目推荐-ColugoMum】这群本科生基于国产深度学习框架PaddlePadddle开源了零售行业解决方案

Personally design a highly concurrent seckill system

2022 CISP-PTE(三)命令执行

Summary of UI module design and practical application of agent mode
随机推荐
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
论文笔记 VSALM 文献综述《A Comprehensive Survey of Visual SLAM Algorithms》
Redis command
vmware虚拟机C盘扩容
Floating menu operation
Request weather interface format, automation
Opencv mouse and keyboard events
Selenium - 改变窗口大小,不同机型呈现的宽高长度会不一样
SQL implementation merges multiple rows of records into one row
Software testing assignment - day 1
[open source project recommendation colugomum] this group of undergraduates open source retail industry solutions based on the domestic deep learning framework paddlepadddle
[untitled]
opencv
Abstract learning
The dynamic analysis and calculation of expressions are really delicious for flee
opencv
卡特兰数(Catalan)的应用场景
Create your own deep learning environment with CONDA
JMeter linked database
These two mosquito repellent ingredients are harmful to babies. Families with babies should pay attention to choosing mosquito repellent products