当前位置:网站首页>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();
以上就是提供个使用的参考,提高点效率,没什么原理,通过以上代码,大致能够获取到所需的数据了,接下来要怎么处理,打个断点,看下返回数据的结构,按需取就可以了。
边栏推荐
- Opencv mouse and keyboard events
- Important knowledge points of redis
- Cannot get value with @value, null
- Read blog type data from mysql, Chinese garbled code - solved
- DNS forward query:
- La loi des 10 000 heures ne fait pas de vous un maître de programmation, mais au moins un bon point de départ
- Docker advanced learning (container data volume, MySQL installation, dockerfile)
- Machine learning | simple but feature standardization methods that can improve the effect of the model (comparison and analysis of robustscaler, minmaxscaler, standardscaler)
- POI dealing with Excel learning
- New knowledge! The virtual machine network card causes your DNS resolution to slow down
猜你喜欢

IC_ EDA_ All virtual machine (rich Edition): questasim, vivado, VCs, Verdi, DC, Pt, spyglass, icc2, synthesize, innovative, ic617, mmsim, process library

2022 CISP-PTE(三)命令执行

Ruoyi interface permission verification

Software testing learning - day one

vmware虚拟机C盘扩容

Practical plug-ins in idea

Software testing learning - day 3

卡特兰数(Catalan)的应用场景

机器学习 | 简单但是能提升模型效果的特征标准化方法(RobustScaler、MinMaxScaler、StandardScaler 比较和解析)

SSH link remote server and local display of remote graphical interface
随机推荐
Yolov3 learning notes
Example of joint use of ros+pytoch (semantic segmentation)
Use @data in Lombok to simplify entity class code
第8章、MapReduce 生产经验
10000小时定律不会让你成为编程大师,但至少是个好的起点
[leetcode] day93 - intersection of two arrays II
方差迭代公式推导
Software testing learning - day 3
[untitled] 8 simplified address book
Asynchronous programming: async/await in asp Net
Know flex box
2022-06-23 VGMP-OSPF-域間安全策略-NAT策略(更新中)
EasyExcel
Ruoyi interface permission verification
【无标题】8 简易版通讯录
How to migrate or replicate VMware virtual machine systems
The dynamic analysis and calculation of expressions are really delicious for flee
Pytest attempts to execute the test case without skipping, but the case shows that it is all skipped
New knowledge! The virtual machine network card causes your DNS resolution to slow down
Software testing learning - the next day