|
|
@@ -311,7 +311,7 @@ func searchRepo(ctx *context.Context, TableName string, Key string, Page int, Pa |
|
|
|
topicsQuery := elastic.NewMatchQuery("topics", Key).Boost(1).QueryName("f_third") |
|
|
|
boolQ.Should(nameQuery, descriptionQuery, topicsQuery) |
|
|
|
|
|
|
|
res, err := client.Search(TableName).Query(boolQ).SortBy(getSort(SortBy, ascending, "updated_unix.keyword", false)...).From(from).Size(Size).Highlight(queryHighlight("alias", "description", "topics")).Do(ctx.Req.Context()) |
|
|
|
res, err := client.Search(TableName).Query(boolQ).SortBy(getSort(SortBy, ascending, "num_stars", false)...).From(from).Size(Size).Highlight(queryHighlight("alias", "description", "topics")).Do(ctx.Req.Context()) |
|
|
|
if err == nil { |
|
|
|
searchJson, _ := json.Marshal(res) |
|
|
|
log.Info("searchJson=" + string(searchJson)) |
|
|
|