From 0a3c3357f388cc60d5f43a056ee2381e51586cff Mon Sep 17 00:00:00 2001 From: Lauris BH Date: Sat, 16 Jan 2021 06:55:17 +0200 Subject: Sort issue search results by revelance (#14353) --- modules/indexer/issues/elastic_search.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/indexer/issues/elastic_search.go') diff --git a/modules/indexer/issues/elastic_search.go b/modules/indexer/issues/elastic_search.go index 4cdeff53dc..3af64ed30e 100644 --- a/modules/indexer/issues/elastic_search.go +++ b/modules/indexer/issues/elastic_search.go @@ -205,7 +205,7 @@ func (b *ElasticSearchIndexer) Search(keyword string, repoIDs []int64, limit, st searchResult, err := b.client.Search(). Index(b.indexerName). Query(query). - Sort("id", true). + Sort("_score", false). From(start).Size(limit). Do(context.Background()) if err != nil { -- cgit v1.2.3