Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Full-text search for DReps and governance actions through a dedicated search service

Aperta
#4,268 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
backend, search

Direzione di ricerca

Start with src/metadata/text-cache.ts and the search restored by #4266 to understand the current fallback behavior. Then trace the existing capability mechanism and the DRep and governance-action data paths mentioned in the proposal. Done means an optional indexed search service provides consistent ranked results, while unconfigured backends retain the current behavior and all listed acceptance cases pass.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

💡 Feature idea
Context

#4262 restored searching DReps by name and governance actions by title, abstract, motivation and rationale (#4266). That fix is an interim solution: no chain-data provider indexes document text, so govtool-backend searches its own in-memory snapshot, reading the text from the metadata service into a per-process cache (src/metadata/text-cache.ts, decision D155).

This works, but it has limits:

  • DRep names come from a background warmer. A directory holds thousands of DReps, so a name search only reads names already cached. Right after a backend start, a DRep whose name the warmer hasn't reached yet isn't found.
  • Action text search waits up to 5 s. Text not cached by then isn't matched on that request.
  • Matching is a plain case-insensitive substring. No ranking, word stemming, typo tolerance or partial-word matching, and only a few fields are searched.
  • Each backend process keeps its own cache. Several instances each fetch every document, and a restart starts from empty.
  • Without a metadata service, search matches ids only.
Proposal

Move free-text search into a dedicated search service that indexes the anchored documents ahead of time, as decisions D40, D45 and D87 already anticipated (an index provider for free text):

  • Index DRep CIP-119 documents (givenName, objectives, motivations, qualifications) and governance action CIP-108 documents (title, abstract, motivation, rationale), keyed by anchor hash.
  • Keep the index current as anchors change: new registrations, updates and new actions.
  • Serve search results with ranking, so the backend pages over results instead of filtering its whole snapshot.
  • Declare it through the existing capability mechanism, so the backend uses it when it's configured and falls back to the current cache-based search when it isn't.
Acceptance
  • A name or title search finds every matching DRep or action, including right after a backend start.
  • Search time doesn't depend on how many documents exist or are cached.
  • Results are the same across backend instances.
  • With no search service configured, behaviour is unchanged from #4266.
Lingua principale
HTML
Stelle
22
Fork
28
Merge medio
20h 44m
PR unite (30g)
33

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di IntersectMBO/govtool

Tutte le issue di IntersectMBO/govtool

Issue simili

Altre issue su Backend & API Design

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.