Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

search: index entry bodies (Notes and Evidence) with a lazily loaded prebuilt index

未關閉
#92 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

評估

難度
4/5
預估耗時
3-5 天
新手友好度
42/100
Issue 類型
功能
描述清晰度
描述清楚
活躍度
活躍
技術堆疊
javascript
領域
search

研究方向

Start with site/lib/search.mjs, especially searchFields(e) and scoreFields, then check the build flow that produces dist/search-index.json and the existing search tests. Add a fixture whose Notes contain a unique word and verify it is found with body hits ranked below name and tag hits. Done when the index loads on first keystroke, the initial home page payload is unchanged, snippets appear for body matches, and the ROADMAP item moves to Done.

由索引模型根據 Issue 內容生成。

描述

enhancement priority: medium

Why it matters
Searching "GDPR", "share-alike", "Steam disclosure", "AGPL export" or "file conversion" finds nothing, although those phrases are exactly what the Notes sections record. The catalog's differentiator is the licence reading, and that text is unsearchable. ROADMAP.md lists full-text search as planned.

Evidence

  • site/lib/search.mjs:23-29 searchFields(e) builds three fields (name/publisher/tags, summary, licence); body text is excluded.
  • data.js is already ~326 KB (see #75), so appending full bodies would roughly double it.

Suggested approach

  1. At build time tokenise each body (lowercase, stop words out, light stemming) and emit a compact inverted index dist/search-index.json (token → entry ids), fetched on the first keystroke rather than on page load.
  2. Score body hits below name/tag hits in scoreFields so current ranking holds.
  3. Show a one-line snippet around the match on the card when the hit came from the body.
  4. Test with a fixture entry whose Notes contain a unique word.

Done when
A word that only appears in an entry's Notes returns that entry, the home-page payload before the first search is unchanged, and the ROADMAP item moves to Done.

主要語言
JavaScript
星號
58
分支
15
平均合併
16 小時 53 分鐘
30 天內合併 PR
14

環境準備

從這裡開始

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