当前位置:网站首页>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();
以上就是提供个使用的参考,提高点效率,没什么原理,通过以上代码,大致能够获取到所需的数据了,接下来要怎么处理,打个断点,看下返回数据的结构,按需取就可以了。
边栏推荐
- [5g NR] UE registration process
- Dbnet: real time scene text detection with differentiable binarization
- Redis command
- A letter to graduating college students
- Scroll view specifies the starting position of the scrolling element
- UTC时间、GMT时间、CST时间
- 【无标题】5 自用历程
- Unittest attempt
- Yolov3 learning notes
- C2338 Cannot format an argument. To make type T formattable provide a formatter<T> specialization:
猜你喜欢
These two mosquito repellent ingredients are harmful to babies. Families with babies should pay attention to choosing mosquito repellent products
每日刷題記錄 (十一)
Machine learning | simple but feature standardization methods that can improve the effect of the model (comparison and analysis of robustscaler, minmaxscaler, standardscaler)
ssh链接远程服务器 及 远程图形化界面的本地显示
Summary of remote connection of MySQL
VMware virtual machine C disk expansion
Jenkins
Yolov1 learning notes
卡特兰数(Catalan)的应用场景
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'?
随机推荐
Opencv mouse and keyboard events
Redis command
Asynchronous programming: async/await in asp Net
Derivation of variance iteration formula
Docker advanced learning (container data volume, MySQL installation, dockerfile)
Read blog type data from mysql, Chinese garbled code - solved
The 10000 hour rule won't make you a master programmer, but at least it's a good starting point
Software testing assignment - the next day
UNI-APP中条件注释 实现跨段兼容、导航跳转 和 传参、组件创建使用和生命周期函数
opencv
远端rostopic的本地rviz调用及显示
[open source project recommendation colugomum] this group of undergraduates open source retail industry solutions based on the domestic deep learning framework paddlepadddle
堆排序和优先队列
Stream stream
[LeetCode]404. 左叶子之和
These two mosquito repellent ingredients are harmful to babies. Families with babies should pay attention to choosing mosquito repellent products
Selenium - by changing the window size, the width, height and length of different models will be different
爬虫代码基础教学
【类和对象】深入浅出类和对象
Important knowledge points of redis