1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2025-07-23 11:39:41 +02: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:
Shiny Nematoda 2024-11-01 13:06:02 +00:00
parent c8ba330833
commit a265574821
10 changed files with 56 additions and 31 deletions

View file

@ -236,7 +236,7 @@ func (b *Indexer) Search(ctx context.Context, options *internal.SearchOptions) (
}
if options.SortBy == "" {
options.SortBy = internal.SortByCreatedAsc
options.SortBy = internal.SortByScore
}
sortBy := []elastic.Sorter{
parseSortBy(options.SortBy),