当前位置:网站首页>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 .
边栏推荐
- opencv
- DBNet:具有可微分二值化的实时场景文本检测
- Jenkins
- Unittest attempt
- [Code] occasionally take values, judge blanks, look up tables, verify, etc
- 10000小时定律不会让你成为编程大师,但至少是个好的起点
- Golang operation redis: write and read hash type data
- 机械观和系统观的科学思维方式各有什么特点和作用
- Pytest -- write and manage test cases
- [classes and objects] explain classes and objects in simple terms
猜你喜欢
Jenkins
Personally design a highly concurrent seckill system
Software testing assignment - the next day
[Fiddler actual operation] how to use Fiddler to capture packets on Apple Mobile Phones
IC_ EDA_ All virtual machine (rich Edition): questasim, vivado, VCs, Verdi, DC, Pt, spyglass, icc2, synthesize, innovative, ic617, mmsim, process library
如何迁移或复制VMware虚拟机系统
Arctic code vault contributor
Realize PDF to picture conversion with C #
Winter vacation work of software engineering practice
Software testing learning - the next day
随机推荐
EasyExcel
Jmeter+influxdb+grafana of performance tools to create visual real-time monitoring of pressure measurement -- problem record
修改MySQL密码
Arctic code vault contributor
Learning notes -- principles and comparison of k-d tree and IKD tree
Numerical method for solving optimal control problem (I) -- gradient method
php artisan
Summary of the design and implementation of the weapon system similar to the paladin of vitality
(翻译)异步编程:Async/Await在ASP.NET中的介绍
MySQL installation
SQL implementation merges multiple rows of records into one row
Application scenarios of Catalan number
Summary of UI module design and practical application of agent mode
Interface learning
[LeetCode]404. 左叶子之和
【code】偶尔取值、判空、查表、验证等
Yolov3 learning notes
opencv
MySQL transaction rollback, error points record
2022-06-23 VGMP-OSPF-域間安全策略-NAT策略(更新中)