当前位置:网站首页>Resthighlevelclient gets the mapping of an index
Resthighlevelclient gets the mapping of an index
2022-07-03 06:55:00 【Gentleman jiejie】
Reference code :
// Build request
GetMappingsRequest request = new GetMappingsRequest().indices(" Index name ");
// Use RestHighLevelClient Initiate request
GetMappingsResponse response = restHighLevelClient.indices().getMapping(request, RequestOptions.DEFAULT);
Get GetMappingsResponse After this response data , How to process and obtain the data , Reference code :
Map<String, MappingMetaData> mappingMap = response.mappings();
MappingMetaData indexMapping = mappingMap.get(" Index name ");
Map<String, Object> mapping = indexMapping.sourceAsMap();
The above is to provide a reference for use , Improve efficiency , It doesn't work , Through the above code , We can roughly obtain the required data , What to do next , Make a break , Look at the structure of the returned data , Just pick it up on demand .
边栏推荐
- RestHighLevelClient获取某个索引的mapping
- [untitled] 5 self use history
- 【code】if (list != null && list.size() > 0)优化,集合判空实现方式
- 【类和对象】深入浅出类和对象
- In depth analysis of reentrantlock fair lock and unfair lock source code implementation
- [untitled]
- MySQL installation
- VMware virtual machine C disk expansion
- Tool class static method calls @autowired injected service
- Learning notes -- principles and comparison of k-d tree and IKD tree
猜你喜欢

Ruoyi interface permission verification

These two mosquito repellent ingredients are harmful to babies. Families with babies should pay attention to choosing mosquito repellent products

My 2020 summary "don't love the past, indulge in moving forward"

The list of "I'm crazy about open source" was released in the first week, with 160 developers on the list

Golang operation redis: write and read hash type data

Software testing learning - day 3

Inno setup production and installation package

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

Summary of UI module design and practical application of agent mode

Liang Ning: 30 lectures on brain map notes for growth thinking
随机推荐
Reading notes of "learn to ask questions"
C2338 Cannot format an argument. To make type T formattable provide a formatter<T> specialization:
100000 bonus is divided up. Come and meet the "sister who braves the wind and waves" among the winners
每日刷题记录 (十一)
Pytest attempts to execute the test case without skipping, but the case shows that it is all skipped
[LeetCode]404. Sum of left leaves
Hands on redis master-slave replication, sentinel master-slave switching, cluster sharding
Asynchronous programming: async/await in asp Net
Search engine Bing Bing advanced search skills
EasyExcel
每日刷題記錄 (十一)
机器学习 | 简单但是能提升模型效果的特征标准化方法(RobustScaler、MinMaxScaler、StandardScaler 比较和解析)
Example of joint use of ros+pytoch (semantic segmentation)
[leetcode] day93 - intersection of two arrays II
Yolov3 learning notes
Practice of enterprise ab/testing platform
mongodb
如何迁移或复制VMware虚拟机系统
SSH link remote server and local display of remote graphical interface
Jenkins