feat: 支持拼音搜索
All checks were successful
deploy to server / build-and-deploy (push) Successful in 3m38s

- 使用pinyin-pro进行汉语拼音转换
- 调整搜索权重
This commit is contained in:
2025-11-10 15:39:47 +08:00
parent 4c8dfb5b56
commit 710a0cdc5b
6 changed files with 71 additions and 4 deletions

View File

@ -77,7 +77,7 @@
const fuzzyMatchedQuestions = fuzzyMatch(questions.value, {
keyword: filters.keyword,
keys: ['title', 'content'],
threshold: 0.2,
threshold: 0.3,
});
return fuzzyMatchedQuestions.filter((question: QuestionListView) => {
const matchProduct = filters.selectedProduct