← Todas las plantillas

Búsqueda tolerante a errores tipográficos, filtros y facetas, resultados en menos de 200 ms.

Spec — Full-text search

Status: draft · Created: 2026-11-10

1. Context and goal

People find records by typing words, even misspelled, and narrow the results with filters, fast enough to search as they type.

2. Functional requirements (EARS)

  • FR-1: WHEN a query is submitted, THE SYSTEM SHALL match its words in the title, body and tags, ranking a title match above a body match.
  • FR-2: THE SYSTEM SHALL tolerate 1 typo in words of 4 to 7 characters and 2 typos in longer words, and match the last word typed as a prefix.
  • FR-3: WHEN filters are applied, THE SYSTEM SHALL combine values of one field with OR and different fields with AND.
  • FR-4: THE SYSTEM SHALL return, with each page, facet counts for every filterable field over the whole filtered result set.
  • FR-5: THE SYSTEM SHALL answer 95% of queries in under 200 ms at the server for an index of 1 million records.
  • FR-6: WHEN a record is created, changed or deleted, THE SYSTEM SHALL reflect the change in results within 5 seconds.
  • FR-7: THE SYSTEM SHALL return and count in facets only records the caller may read.
  • FR-8: THE SYSTEM SHALL highlight matched terms in a snippet of up to 200 characters and return 20 results a page, up to 1,000 results in total.

3. Out of scope

  • Semantic or vector search.
  • Search analytics.