Browse Source

Merge branch 'feature/pool_es_search' into debug

xiexiaoyuan 2 years ago
parent
commit
f211feb14c
1 changed files with 4 additions and 4 deletions
  1. 4 4
      services/elastic/report.go

+ 4 - 4
services/elastic/report.go

@@ -132,12 +132,12 @@ func SearchReport(keyWord string, classifyIdFirsts []int, classifyIdSeconds []in
 
 	source["sort"] = []map[string]interface{}{
 		map[string]interface{}{
-			"_score":map[string]interface{}{
+			"PublishTime.keyword":map[string]interface{}{
 				"order":"desc",
 			},
 		},
 		map[string]interface{}{
-			"PublishTime.keyword":map[string]interface{}{
+			"_score":map[string]interface{}{
 				"order":"desc",
 			},
 		},
@@ -271,12 +271,12 @@ func ReportListSearch(keyWord string, classifyIdFirst int, classifyIdSeconds []i
 
 	source["sort"] = []map[string]interface{}{
 		map[string]interface{}{
-			"_score":map[string]interface{}{
+			"PublishTime.keyword":map[string]interface{}{
 				"order":"desc",
 			},
 		},
 		map[string]interface{}{
-			"PublishTime.keyword":map[string]interface{}{
+			"_score":map[string]interface{}{
 				"order":"desc",
 			},
 		},