当前位置:网站首页>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 .
边栏推荐
- [leetcode] day93 - intersection of two arrays II
- 2022 - 06 - 23 vgmp - OSPF - Inter - Domain Security Policy - nat Policy (Update)
- golang操作redis:写入、读取hash类型数据
- instanceof
- Daily question brushing record (11)
- The list of "I'm crazy about open source" was released in the first week, with 160 developers on the list
- Modify MySQL password
- Jenkins
- SQL implementation merges multiple rows of records into one row
- (翻译)异步编程:Async/Await在ASP.NET中的介绍
猜你喜欢
![[5g NR] UE registration process](/img/e3/f881d51fba03010de8c45ea480f3f0.png)
[5g NR] UE registration process

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'?

Inno Setup 制作安装包

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

Application scenarios of Catalan number

Winter vacation work of software engineering practice

Machine learning | simple but feature standardization methods that can improve the effect of the model (comparison and analysis of robustscaler, minmaxscaler, standardscaler)

熊市里的大机构压力倍增,灰度、Tether、微策略等巨鲸会不会成为'巨雷'?

In depth analysis of reentrantlock fair lock and unfair lock source code implementation

Setting up the development environment of dataworks custom function
随机推荐
Interface learning
Notes on the core knowledge of Domain Driven Design DDD
golang操作redis:写入、读取kv数据
Golang operation redis: write and read hash type data
instanceof
[open source project recommendation colugomum] this group of undergraduates open source retail industry solutions based on the domestic deep learning framework paddlepadddle
New knowledge! The virtual machine network card causes your DNS resolution to slow down
Unit test notes
Abstract learning
Selenium - by changing the window size, the width, height and length of different models will be different
[classes and objects] explain classes and objects in simple terms
Search engine Bing Bing advanced search skills
vmware虚拟机C盘扩容
The difference between CONDA and pip
Create your own deep learning environment with CONDA
Basic teaching of crawler code
golang操作redis:写入、读取hash类型数据
爬虫代码基础教学
MySQL installation
Golang operation redis: write and read kV data