package com.kidgrow.searchcenter.controller;
import com.kidgrow.searchcenter.service.IAggregationService;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.Map;
/**
* 石家庄喜高科技有限责任公司 版权所有 © Copyright 2020
*
* @Description: 聚合统计
* @Project:
* @CreateDate: Created in 2020/2/24 13:47
* @Author: liuke
*/
@Slf4j
@RestController
@Api(tags = "搜索模块api")
@RequestMapping("/agg")
public class AggregationController {
@Autowired
private IAggregationService aggregationService;
/**
* 访问统计聚合查询
* @param indexName 索引名
* @param routing es的路由
*/
@GetMapping("/requestStat/{indexName}/{routing}")
public Map requestStatAgg(@PathVariable String indexName, @PathVariable String routing) {
return aggregationService.requestStatAgg(indexName, routing);
}
}