소스 검색

feat:修改方法

wangchuanjin 2 년 전
부모
커밋
7c97492d5b
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      es/esv7.go

+ 1 - 1
es/esv7.go

@@ -1000,7 +1000,7 @@ func (e *EsV7) GetWithCount(index, itype, countQuery, allQuery string) (int64, *
 	var res []map[string]interface{}
 	count := e.Count(index, itype, countQuery)
 	if client != nil {
-		searchResult, err := client.Search().Index(index).Source(countQuery).Do(context.TODO())
+		searchResult, err := client.Search().Index(index).Source(allQuery).Do(context.TODO())
 		if err != nil {
 			log.Println("从ES查询出错", err.Error())
 			return count, nil