0
0
mirror of https://github.com/go-gitea/gitea.git synced 2025-02-19 07:24:03 +01:00
gitea/routers/web
Lunny Xiao 72518a8dab
Rework suggestion backend (#33538)
Fix #33522 

The suggestion backend logic now is

- If the keyword is empty, returned the latest 5 issues/prs with index
desc order
- If the keyword is digital, find all issues/prs which `index` has a
prefix with that, with index asc order
- If the keyword is non-digital or if the queried records less than 5,
searching issues/prs title with a `like`, with index desc order

## Empty keyword
<img width="310" alt="image"
src="https://github.com/user-attachments/assets/1912c634-0d98-4eeb-8542-d54240901f77"
/>

## Digital
<img width="479" alt="image"
src="https://github.com/user-attachments/assets/0356a936-7110-4a24-b21e-7400201bf9b8"
/>

## Digital and title contains the digital
<img width="363" alt="image"
src="https://github.com/user-attachments/assets/6e12f908-28fe-48de-8ccc-09cbeab024d4"
/>

## non-Digital
<img width="435" alt="image"
src="https://github.com/user-attachments/assets/2722bb53-baa2-4d67-a224-522a65f73856"
/>
<img width="477" alt="image"
src="https://github.com/user-attachments/assets/06708dd9-80d1-4a88-b32b-d29072dd1ba6"
/>

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-02-10 16:24:05 +00:00
..
admin Support performance trace (#32973) 2025-01-21 18:57:07 +00:00
auth Support disable passkey auth (#33348) 2025-01-22 22:58:36 +00:00
devtest De-emphasize signed commits (#31160) 2024-12-28 04:18:30 +08:00
events Move context from modules to services (#29440) 2024-02-27 08:12:22 +01:00
explore Fix bleve fuzziness search (#33078) 2025-01-03 00:32:02 +08:00
feed Add pubdate for repository rss and add some tests (#33411) 2025-01-27 23:58:46 +08:00
healthcheck Always enable caches (#28527) 2023-12-19 09:29:05 +00:00
misc Refactor template & test related code (#32938) 2024-12-22 15:33:19 +00:00
org Refactor web route handler (#33488) 2025-02-05 02:14:03 +08:00
repo Rework suggestion backend (#33538) 2025-02-10 16:24:05 +00:00
shared [Feature] Private README.md for organization (#32872) 2024-12-31 04:22:09 +00:00
user Refactor web route handler (#33488) 2025-02-05 02:14:03 +08:00
base.go Prepare for support performance trace (#33286) 2025-01-15 20:05:18 +00:00
githttp.go Fix LFS route mock, realm, middleware names (#32488) 2024-11-13 16:58:09 +08:00
goget.go Make git clone URL could use current signed-in user (#33091) 2025-01-07 13:17:44 +08:00
home.go Refactor template & test related code (#32938) 2024-12-22 15:33:19 +00:00
metrics.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
nodeinfo.go Move context from modules to services (#29440) 2024-02-27 08:12:22 +01:00
passkey.go Move context from modules to services (#29440) 2024-02-27 08:12:22 +01:00
swagger_json.go Move context from modules to services (#29440) 2024-02-27 08:12:22 +01:00
web.go Refactor web route handler (#33488) 2025-02-05 02:14:03 +08:00
webfinger.go Move context from modules to services (#29440) 2024-02-27 08:12:22 +01:00