mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-05 14:20:16 +00:00
enh(search): improve issue search
- new sort by relevency option for issue search - rework bleve fuzzy search to consider each term rather than matching the entire phrase
This commit is contained in:
parent
c8ba330833
commit
a265574821
10 changed files with 56 additions and 31 deletions
|
@ -78,7 +78,9 @@ func ToSearchOptions(keyword string, opts *issues_model.IssuesOptions) *SearchOp
|
|||
searchOpt.Paginator = opts.Paginator
|
||||
|
||||
switch opts.SortType {
|
||||
case "", "latest":
|
||||
case "", "relevance":
|
||||
searchOpt.SortBy = SortByScore
|
||||
case "latest":
|
||||
searchOpt.SortBy = SortByCreatedDesc
|
||||
case "oldest":
|
||||
searchOpt.SortBy = SortByCreatedAsc
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue