Rework suggestion backend (#33538)#33546
Merged
lunny merged 1 commit intogo-gitea:release/v1.23from Feb 10, 2025
Merged
Conversation
Fix go-gitea#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>
hiifong
approved these changes
Feb 10, 2025
lunny
approved these changes
Feb 10, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport #33538 by @lunny
Fix #33522
The suggestion backend logic now is
indexhas a prefix with that, with index asc orderlike, with index desc orderEmpty keyword
Digital
Digital and title contains the digital
non-Digital