Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added more searching criteria #99

Merged
merged 5 commits into from
Jan 20, 2025
Merged

Added more searching criteria #99

merged 5 commits into from
Jan 20, 2025

Conversation

isHarryh
Copy link
Owner

@isHarryh isHarryh commented Jan 20, 2025

Solve #46 #88

概述

本 PR 针对角色模型的搜索功能,增加了以下特性:

  • 支持角色名称的拼音全拼/首字母搜索
  • 支持中文简繁体互通搜索
  • 支持时装品牌搜索

同时,规范了搜索结果的排列规则,使其按照以下匹配顺序排列:

  1. 角色名称(name)
  2. 角色英文代号(appellation)
  3. 角色名称的拼音首字母
  4. 角色名称的拼音全拼
  5. 时装品牌

依赖引入

  1. com.github.promeg:tinypinyin:2.0.3: promeG/TinyPinyin
  2. com.github.houbb:opencc4j:1.8.1: houbb/opencc4j

效果预览

由于采取了拼音缓存策略,因此首次搜索的耗时会相对更长,而后续搜索的耗时则大幅减少。

@isHarryh isHarryh marked this pull request as ready for review January 20, 2025 09:54
@isHarryh isHarryh merged commit 9d945ca into v3.x Jan 20, 2025
2 checks passed
@isHarryh isHarryh added the Enhancement New feature or request label Jan 20, 2025
@isHarryh isHarryh deleted the v3.x-search branch January 21, 2025 04:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant