当前位置:网站首页>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();
以上就是提供个使用的参考,提高点效率,没什么原理,通过以上代码,大致能够获取到所需的数据了,接下来要怎么处理,打个断点,看下返回数据的结构,按需取就可以了。
边栏推荐
- Redis command
- Paper notes vsalm literature review "a comprehensive survey of visual slam algorithms"
- Machine learning | simple but feature standardization methods that can improve the effect of the model (comparison and analysis of robustscaler, minmaxscaler, standardscaler)
- Summary of remote connection of MySQL
- 简易密码锁
- 【code】偶尔取值、判空、查表、验证等
- 【无标题】8 简易版通讯录
- Yolov2 learning and summary
- Unit test notes
- 保险公司怎么查高血压?
猜你喜欢

ssh链接远程服务器 及 远程图形化界面的本地显示

10000小時定律不會讓你成為編程大師,但至少是個好的起點

Scroll view specifies the starting position of the scrolling element

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

(翻译)异步编程:Async/Await在ASP.NET中的介绍

Yolov2 learning and summary

Important knowledge points of redis

Yolov3 learning notes

Install VM tools

Selenium - 改变窗口大小,不同机型呈现的宽高长度会不一样
随机推荐
第8章、MapReduce 生产经验
C2338 Cannot format an argument. To make type T formattable provide a formatter<T> specialization:
Summary of remote connection of MySQL
vmware虚拟机C盘扩容
100000 bonus is divided up. Come and meet the "sister who braves the wind and waves" among the winners
mongodb
DBNet:具有可微分二值化的实时场景文本检测
Selenium - 改变窗口大小,不同机型呈现的宽高长度会不一样
远端rostopic的本地rviz调用及显示
error C2017: 非法的转义序列
Learning notes -- principles and comparison of k-d tree and IKD tree
[C /vb.net] convert PDF to svg/image, svg/image to PDF
Chapter 8. MapReduce production experience
Scroll view specifies the starting position of the scrolling element
Shell conditional statement
Derivation of variance iteration formula
Important knowledge points of redis
Asynchronous programming: async/await in asp Net
Interface test weather API
UTC time, GMT time, CST time