-
Notifications
You must be signed in to change notification settings - Fork 56
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
feat: add user fuzzy search #184
base: dev
Are you sure you want to change the base?
feat: add user fuzzy search #184
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
感谢贡献,期待这个功能完成。
关于热度,目前不考虑提供作者热度的功能,这样对新作者稍微友好一点。(或者作者热度和作业一样有时间衰减严重的特性,这块得额外设计了)
使用拼音搜索应该需要把拼音和拼音缩写都存储到数据库中,得修改一下 MaaUser
的信息了。
评论区禁用相关功能看起来已经完成了,我有空测试一下。
后续代码提交后麻烦你手动执行一下 ./gradlew ktlintFormat
格式化一次代码,谢谢~
val copilotOptional = copilotRepository.findByCopilotId(coplitId) | ||
Assert.isTrue(copilotOptional != null, "copilot不存在") | ||
val copilot = copilotOptional!! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
val copilot = copilotRepository.findByCopilotId(coplitId)
checkNotNull(copilot) {
"copilot不存在"
}
使用内置的 checkNotNull
可以smartcast到非空类型
#183 增加用户接口模糊搜索
但是算法还没有想好暂时只能精确搜索
格式如下
需要考虑汉拼转换,简繁转换,作者热度等...?
提供了PinYinUtil工具类为后续使用
p.s. pr融合了#182 的commit