|
@@ -1000,7 +1000,7 @@ func (e *EsV7) GetWithCount(index, itype, countQuery, allQuery string) (int64, *
|
|
var res []map[string]interface{}
|
|
var res []map[string]interface{}
|
|
count := e.Count(index, itype, countQuery)
|
|
count := e.Count(index, itype, countQuery)
|
|
if client != nil {
|
|
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 {
|
|
if err != nil {
|
|
log.Println("从ES查询出错", err.Error())
|
|
log.Println("从ES查询出错", err.Error())
|
|
return count, nil
|
|
return count, nil
|