Browse Source

提交代码。

Signed-off-by: zouap <zouap@pcl.ac.cn>
tags/v1.22.3.2^2
zouap 3 years ago
parent
commit
35fffdb393
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      routers/search.go

+ 2
- 2
routers/search.go View File

@@ -427,7 +427,7 @@ func searchIssue(ctx *context.Context, TableName string, Key string, Page int, P
commentQuery := elastic.NewMatchQuery("comment", Key).Boost(1).QueryName("f_third")
boolQ.Should(nameQuery, contentQuery, commentQuery)
}
isIssueQuery := elastic.NewTermQuery("is_pull.keyword", false)
isIssueQuery := elastic.NewTermQuery("is_pull", "f")
boolQ.Must(isIssueQuery)
res, err := client.Search(TableName).Query(boolQ).Sort(SortBy, ascending).From((Page - 1) * PageSize).Size(PageSize).Do(ctx.Req.Context())
if err == nil {
@@ -510,7 +510,7 @@ func searchPR(ctx *context.Context, TableName string, Key string, Page int, Page
commentQuery := elastic.NewMatchQuery("comment", Key).Boost(1).QueryName("f_third")
boolQ.Should(nameQuery, contentQuery, commentQuery)
}
isIssueQuery := elastic.NewTermQuery("is_pull", true)
isIssueQuery := elastic.NewTermQuery("is_pull", "t")
boolQ.Must(isIssueQuery)
res, err := client.Search(TableName).Query(boolQ).Sort(SortBy, ascending).From((Page - 1) * PageSize).Size(PageSize).Do(ctx.Req.Context())
if err == nil {


Loading…
Cancel
Save