当前位置:网站首页>es使用collapseBuilder去重和只返回某个字段
es使用collapseBuilder去重和只返回某个字段
2022-07-05 01:15:00 【talen_hx296】
去重
SearchRequest searchRequest = new SearchRequest(esIndices2.toArray(new String[esIndices2.size()]));
// 构建搜索条件
SearchSourceBuilder sourceBuilder = new SearchSourceBuilder();
//指定去重字段
CollapseBuilder collapseBuilder = new CollapseBuilder("userName.keyword");
searchRequest.source(sourceBuilder.query(boolBuilder).collapse(collapseBuilder).trackTotalHits(true));指定字段
earchSourceBuilder searchSourceBuilder = new SearchSourceBuilder();
searchSourceBuilder.fetchSource("userName", null)边栏推荐
- Les phénomènes de « salaire inversé » et de « remplacement des diplômés » indiquent que l'industrie des tests a...
- Redis master-slave replication cluster and recovery ideas for abnormal data loss # yyds dry goods inventory #
- Take you ten days to easily complete the go micro service series (IX. link tracking)
- Wechat applet: new independent backstage Yuelao office one yuan dating blind box
- Query for Boolean field as "not true" (e.g. either false or non-existent)
- Hedhat firewall
- 测试部新来了个00后卷王,上了年纪的我真的干不过了,已经...
- Global and Chinese markets for stratospheric UAV payloads 2022-2028: Research Report on technology, participants, trends, market size and share
- La jeunesse sans rancune de Xi Murong
- 無心劍英譯席慕容《無怨的青春》
猜你喜欢

“薪资倒挂”、“毕业生平替” 这些现象说明测试行业已经...

Basic operations of database and table ----- create index

Apifox (postman + swagger + mock + JMeter), an artifact of full stack development and efficiency improvement

Talking about JVM 4: class loading mechanism

ROS command line tool

pycharm专业版下载安装教程

What you learned in the eleventh week

How to use words to describe breaking change in Spartacus UI of SAP e-commerce cloud

College degree, what about 33 year old Baoma? I still sell and test, and my monthly income is 13K+

Chia Tai International Futures: what is the master account and how to open it?
随机推荐
What is the current situation and Prospect of the software testing industry in 2022?
Database postragesql lock management
Are you still writing the TS type code
Database postragesq role membership
Classification of performance tests (learning summary)
pycharm专业版下载安装教程
Armv8-a programming guide MMU (3)
[FPGA tutorial case 10] design and implementation of complex multiplier based on Verilog
无心剑英译席慕容《无怨的青春》
Redis(1)之Redis简介
Senior Test / development programmers write no bugs? Qualifications (shackles) don't be afraid of mistakes
dotnet-exec 0.6.0 released
[development of large e-commerce projects] performance pressure test - Performance Monitoring - heap memory and garbage collection -39
微信小程序:全网独家小程序版本独立微信社群人脉
Maximum number of "balloons"
Global and Chinese markets for stratospheric UAV payloads 2022-2028: Research Report on technology, participants, trends, market size and share
多模输入事件分发机制详解
Database postragesql client authentication
Wechat applet: wechat applet source code download new community system optimized version support agent member system function super high income
Yyds dry goods inventory [Gan Di's one week summary: the most complete and detailed in the whole network]; detailed explanation of MySQL index data structure and index optimization; remember collectio