Explorar o código

feat:修改方法

wangchuanjin %!s(int64=2) %!d(string=hai) anos
pai
achega
7c97492d5b
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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