ソースを参照

feat:增加方法

wangchuanjin 2 年 前
コミット
79d83b039b
1 ファイル変更4 行追加0 行削除
  1. 4 0
      es/es.go

+ 4 - 0
es/es.go

@@ -63,6 +63,7 @@ type Es interface {
 	GetAllByNgram_MP(index, itype, qstr, findfields, order, fields string, start, limit, count int, highlight bool) *[]map[string]interface{}
 	GetAllByIk(index, itype, qstr, findfields, order, fields string, start, limit, count int, highlight bool) *[]map[string]interface{}
 	GetResForJYView(index, itype string, keys []KeyConfig, allquery, findfields, SortQuery, fields string, start, limit int) *[]map[string]interface{}
+	GetWithCount(index, itype, query string) (int64, *[]map[string]interface{})
 }
 
 var (
@@ -237,3 +238,6 @@ func GetAllByIk(index, itype, qstr, findfields, order, fields string, start, lim
 func GetResForJYView(index, itype string, keys []KeyConfig, allquery, findfields, SortQuery, fields string, start, limit int) *[]map[string]interface{} {
 	return VarEs.GetResForJYView(index, itype, keys, allquery, findfields, SortQuery, fields, start, limit)
 }
+func GetWithCount(index, itype, query string) (int64, *[]map[string]interface{}) {
+	return VarEs.GetWithCount(index, itype, query)
+}