|
|
|
@@ -68,23 +68,23 @@ func SearchApi(ctx *context.Context) { |
|
|
|
if OnlySearchLabel { |
|
|
|
searchRepoByLabel(ctx, Key, Page, PageSize) |
|
|
|
} else { |
|
|
|
searchRepo(ctx, "repository-es-index", Key, Page, PageSize, OnlyReturnNum) |
|
|
|
searchRepo(ctx, "repository-es-index"+setting.INDEXPOSTFIX, Key, Page, PageSize, OnlyReturnNum) |
|
|
|
} |
|
|
|
return |
|
|
|
} else if TableName == "issue" { |
|
|
|
searchIssueOrPr(ctx, "issue-es-index", Key, Page, PageSize, OnlyReturnNum, "f") |
|
|
|
searchIssueOrPr(ctx, "issue-es-index"+setting.INDEXPOSTFIX, Key, Page, PageSize, OnlyReturnNum, "f") |
|
|
|
return |
|
|
|
} else if TableName == "user" { |
|
|
|
searchUserOrOrg(ctx, "user-es-index", Key, Page, PageSize, true, OnlyReturnNum) |
|
|
|
searchUserOrOrg(ctx, "user-es-index"+setting.INDEXPOSTFIX, Key, Page, PageSize, true, OnlyReturnNum) |
|
|
|
return |
|
|
|
} else if TableName == "org" { |
|
|
|
searchUserOrOrg(ctx, "user-es-index", Key, Page, PageSize, false, OnlyReturnNum) |
|
|
|
searchUserOrOrg(ctx, "user-es-index"+setting.INDEXPOSTFIX, Key, Page, PageSize, false, OnlyReturnNum) |
|
|
|
return |
|
|
|
} else if TableName == "dataset" { |
|
|
|
searchDataSet(ctx, "dataset-es-index", Key, Page, PageSize, OnlyReturnNum) |
|
|
|
searchDataSet(ctx, "dataset-es-index"+setting.INDEXPOSTFIX, Key, Page, PageSize, OnlyReturnNum) |
|
|
|
return |
|
|
|
} else if TableName == "pr" { |
|
|
|
searchIssueOrPr(ctx, "issue-es-index", Key, Page, PageSize, OnlyReturnNum, "t") |
|
|
|
searchIssueOrPr(ctx, "issue-es-index"+setting.INDEXPOSTFIX, Key, Page, PageSize, OnlyReturnNum, "t") |
|
|
|
//searchPR(ctx, "issue-es-index", Key, Page, PageSize, OnlyReturnNum) |
|
|
|
return |
|
|
|
} |
|
|
|
|