From 8ae3dfea888e080cab1491a1cddb98f20e871816 Mon Sep 17 00:00:00 2001 From: Hermes AI Bot Date: Fri, 17 Jul 2026 17:49:14 +0000 Subject: [PATCH] rollback: remove test tip #37 (was E2E test, will regenerate tomorrow) --- TIPS.md | 2 ++ ...7-search-fuzzy-search-for-items-recipes.md | 20 ------------------- 2 files changed, 2 insertions(+), 20 deletions(-) delete mode 100644 tips/2026-07-17-037-search-fuzzy-search-for-items-recipes.md diff --git a/TIPS.md b/TIPS.md index edffe1d..80186f5 100644 --- a/TIPS.md +++ b/TIPS.md @@ -25,3 +25,5 @@ Going forward, new tips are pushed automatically by the `mc_survival_tips.py` cr - [Tip #32](tips/2026-07-13-032-performance-code-split-heavy-components-on-the-recipe-page.md) (2026-07-13) — **performance**: Code-split heavy components on the recipe page - [Tip #34](tips/2026-07-15-034-social-user-comments-on-recipes.md) (2026-07-15) — **social**: User-Comments on recipes - [Tip #37](tips/2026-07-17-037-search-fuzzy-search-for-items-recipes.md) (2026-07-17) — **search**: Fuzzy-Search for items & recipes + +- **[ROLLBACK]** Tip #37 was generated as an E2E test on 2026-07-17; the tip itself is valid but was pushed during testing. It will be regenerated by tomorrow's cron run. diff --git a/tips/2026-07-17-037-search-fuzzy-search-for-items-recipes.md b/tips/2026-07-17-037-search-fuzzy-search-for-items-recipes.md deleted file mode 100644 index 30d4f51..0000000 --- a/tips/2026-07-17-037-search-fuzzy-search-for-items-recipes.md +++ /dev/null @@ -1,20 +0,0 @@ -# Tip #37 — Fuzzy-Search for items & recipes - -**Date:** 2026-07-17 -**Category:** search -**Source:** MC-Survival Wiki Daily Tip (cron @ 18:00 MESZ) - -## Fuzzy-Search for items & recipes - -Fuzzy search lets the wiki match items and recipes even when a player misspells the name, for example 'diamnd sword' or 'nethrite' instead of the correct spelling. It solves the very common problem that players land on a recipe URL from Google or a friend's chat message and cannot type the canonical item name. Real-world server logs show that exact-match-only search produces a high bounce rate on the first query, and the fix is a Levenshtein or trigram fallback on top of the existing Prisma query. With a small alias table, this also doubles as a hand-curated 'what players actually call things' layer. - -## Implementation tips - -1. Add a server function in functions.ts that wraps Prisma queries with a Levenshtein or trigram fallback when no exact match is found. -2. Use fuse.js (lightweight, no deps issues) on the client for instant-as-you-type feedback before hitting the server. -3. Index item aliases (e.g. 'netherite scrap' ↔ 'ancient debris') in a small ItemAlias table — most leverage for least code. -4. Highlight matched characters in the result list so users see WHY a fuzzy hit scored. - -## Watch out - -- Fuzzy search is expensive — debounce input by 200ms and never run it on every keystroke without a limit.