提交 502a7d33 编写于 作者: H huanggze 提交者: zryfish

logging: remove redundant code

Signed-off-by: Nhuanggze <loganhuang@yunify.com>
上级 3c72d088
...@@ -158,16 +158,8 @@ type StartTimeAgg struct { ...@@ -158,16 +158,8 @@ type StartTimeAgg struct {
} }
type TopHits struct { type TopHits struct {
Sort []TopHitsSort `json:"sort"` Sort []Sort `json:"sort"`
Size int `json:"size"` Size int `json:"size"`
}
type TopHitsSort struct {
Order TopHitsSortOrder `json:"time"`
}
type TopHitsSortOrder struct {
Type string `json:"order"`
} }
type HistogramAggs struct { type HistogramAggs struct {
...@@ -263,7 +255,7 @@ func createQueryRequest(param QueryParameters) (int, []byte, error) { ...@@ -263,7 +255,7 @@ func createQueryRequest(param QueryParameters) (int, []byte, error) {
if param.Operation == "statistics" { if param.Operation == "statistics" {
operation = OperationStatistics operation = OperationStatistics
containerAgg := AggField{"kubernetes.docker_id.keyword"} containerAgg := AggField{"kubernetes.docker_id.keyword"}
startTimeAgg := TopHits{[]TopHitsSort{{TopHitsSortOrder{"asc"}}}, 1} startTimeAgg := TopHits{[]Sort{{Order{"asc"}}}, 1}
statisticAggs := StatisticsAggs{ContainerAgg{containerAgg}, StartTimeAgg{startTimeAgg}} statisticAggs := StatisticsAggs{ContainerAgg{containerAgg}, StartTimeAgg{startTimeAgg}}
request.Aggs = statisticAggs request.Aggs = statisticAggs
request.Size = 0 request.Size = 0
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册