active

Edge Search Lab: Multilingual On-Site Search

A static-site search experiment focused on relevance and speed without introducing a backend search service.

AstroFuse.jsTypeScript
// implementation slice status: "active" year: 2025 translationKey: "edge-search-lab"

Edge Search Lab explores one practical question:
how far can we push search quality on a fully static content site?

Problem

The previous experience had two weaknesses:

  1. title matches were okay, body relevance was inconsistent;
  2. mixed-language indexing introduced unnecessary noise.

Instead of adding backend infrastructure, we improved the index model first.

Implementation

Per-Locale Index Sharding

Build output generates:

  • /search/zh.json
  • /search/en.json

Each page loads only its own locale index.

Weighted Relevance

Scoring prioritizes:

  • title
  • tags / tech
  • description / excerpt

This model works especially well for project-heavy sites where technical terms carry intent.

Excerpt Extraction

We do not dump full body content into the index.
MDX content is cleaned and trimmed into high-signal excerpts to keep payload small and useful.

Outcome

  • more stable top results,
  • lower no-result rate,
  • better usability on mobile and slower connections,
  • near-zero maintenance overhead once content is added.

Next Iteration

  • add synonym maps by domain,
  • plug in optional Chinese tokenization strategies,
  • test hybrid retrieval with “recent” and “popular tags” boosts.