rdluck 4 жил өмнө
parent
commit
e910ba8317
1 өөрчлөгдсөн 3 нэмэгдсэн , 1 устгасан
  1. 3 1
      services/elastic.go

+ 3 - 1
services/elastic.go

@@ -320,6 +320,8 @@ func EsMatchFunctionScoreQuery(indexName, keyWord string, startSize, pageSize in
 	highlight = highlight.PreTags("<font color='red'>").PostTags("</font>")
 	request := client.Search(indexName).Highlight(highlight).From(startSize).Size(pageSize).Query(boolquery)
 	searchByMatch, err := request.Do(context.Background())
+	searchJson,err:=json.Marshal(searchByMatch)
+	utils.FileLog.Info("%s",string(searchJson))
 	if searchByMatch != nil {
 		if searchByMatch.Hits != nil {
 			for _, v := range searchByMatch.Hits.Hits {
@@ -478,4 +480,4 @@ func GetArrSum(intArr []int) (sum int) {
 		sum += val
 	}
 	return
-}
+}