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 摘要。