修正列表分片
This commit is contained in:
@@ -400,6 +400,9 @@ func NewSchema(config Config) (graphql.Schema, error) {
|
||||
if args.Text != "" {
|
||||
resp, err := models.ZincSearch(map[string]interface{}{
|
||||
"query": map[string]interface{}{
|
||||
//"term": map[string]interface{}{
|
||||
// "text": args.Text,
|
||||
//},
|
||||
"bool": map[string]interface{}{
|
||||
"must": []map[string]interface{}{
|
||||
{
|
||||
@@ -505,7 +508,9 @@ func NewSchema(config Config) (graphql.Schema, error) {
|
||||
}
|
||||
|
||||
if args.First == 0 && args.Last == 0 {
|
||||
list = list[:10]
|
||||
if len(list) > 10 {
|
||||
list = list[:10]
|
||||
}
|
||||
}
|
||||
|
||||
// 存在外部筛选条件
|
||||
|
Reference in New Issue
Block a user