search: joined-up compounds return nothing ("scifi", "lowpoly"); normalise hyphens/spaces and add a few synonyms

未关闭 适合新手
#176 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
82/100
Issue 类型
功能
描述清晰度
描述清楚
活跃度
活跃
技术栈
javascript
领域
search

调研方向

从 site/lib/search.mjs 开始,阅读现有的搜索测试,了解索引和查询是如何处理的。为连写形式以及用连字符或空格分隔的形式添加测试,并测试列出的同义词;运行相关的单元测试。当 scifi/sci-fi 和 lowpoly/low poly 返回相同结果时,即为完成。

由索引模型根据 Issue 内容生成。

描述

enhancement priority: low

Why it matters

Common search spellings return nothing, so new users conclude the catalog lacks what they want.

Evidence

  • scifi and lowpoly return 0 results, while sci-fi returns 12 and low poly returns 21. "Did you mean" (#109) only partly rescues these.
  • 3d model returns 16 of 77 3D entries.

Suggested approach

  • In site/lib/search.mjs, normalise hyphens and spaces in both the index and the query (index the joined forms too).
  • Add a small synonym map: model/models/mesh, sfx/sound effect, bgm/music, tileset/tilemap.

Done when

Each pair (scifi/sci-fi, lowpoly/low poly) returns the same results, with unit tests.

主要语言
JavaScript
星标
58
派生
15
平均合并
1 天 7 小时
30 天内合并 PR
12

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

TMHSDigital/Free-Game-Dev-Assets 的其他 Issue

查看 TMHSDigital/Free-Game-Dev-Assets 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。