aboutsummaryrefslogtreecommitdiffstats
path: root/modules/indexer/issues/elastic_search.go
diff options
context:
space:
mode:
authorLauris BH <lauris@nix.lv>2021-01-16 06:55:17 +0200
committerGitHub <noreply@github.com>2021-01-16 12:55:17 +0800
commit0a3c3357f388cc60d5f43a056ee2381e51586cff (patch)
treeaff5abc553a1f417c943802c0f2e7d21aab8305f /modules/indexer/issues/elastic_search.go
parent2db4733c7d75b3ca3d1b2750f7b6ed53ac75303c (diff)
downloadgitea-0a3c3357f388cc60d5f43a056ee2381e51586cff.tar.gz
gitea-0a3c3357f388cc60d5f43a056ee2381e51586cff.zip
Sort issue search results by revelance (#14353)
Diffstat (limited to 'modules/indexer/issues/elastic_search.go')
-rw-r--r--modules/indexer/issues/elastic_search.go2
1 files changed, 1 insertions, 1 deletions
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 {