1,hotkey 索引结构
{
"properties": {
"id": {
"type": "keyword"
},
"searchInput": {
"type": "keyword"
},
"createDate": {
"type": "keyword"
},
"searchType": {
"type": "keyword"
}
}
}
2 TopHitsAggregationBuilder
//设置要查询的索引
SearchRequest request = new SearchRequest().indices("hotkey");