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