Search Architecture

Document: 20-search-architecture.md
Version: 1.0.0


Purpose

This document defines the search architecture used across all Rundown projects.

Search enables users to efficiently discover content, products, services, and other information within an application. The search architecture should prioritize simplicity, performance, and scalability while remaining appropriate for the project's requirements.


Search Philosophy

Search should solve the business problem with the simplest appropriate solution.

Dedicated search infrastructure should only be introduced when measurable requirements justify the additional operational complexity.

Rundown favors incremental scalability over premature optimization.


Responsibilities

The search layer owns:


Non-Responsibilities

The search layer should not own:

Search improves access to data but does not become the source of truth.


Search Strategy

Rundown uses a progressive search strategy.

Level 1 — PostgreSQL Search (Default)

Suitable for:

Advantages:

This should be the default choice for new projects.


Level 2 — Meilisearch

Introduce Meilisearch only when PostgreSQL search no longer meets performance or feature requirements.

Typical use cases include:

Meilisearch provides:


Solutions such as Elasticsearch or OpenSearch should only be considered for projects with enterprise-scale search requirements.

These technologies introduce significant operational complexity and are outside the standard Rundown architecture.


Search Sources

Search may include:

Every searchable entity should represent a meaningful business concept.


Search Experience

Good search should provide:

Search should help users complete tasks rather than simply return data.


Filtering

Filtering should represent business attributes.

Examples:

Products:

Portfolio:

Blog:

Avoid filters that exist solely because of database structure.


Sorting

Typical sorting options include:

Sorting should remain consistent across similar content types.


Performance

Search performance should prioritize:

Search should remain responsive under normal production workloads.


Security

Search should respect authorization rules.

Users should never discover content they are not permitted to access.

Private content should remain excluded from public search indexes.


Monitoring

Search quality should be reviewed periodically.

Metrics may include:

Monitoring should support iterative improvements rather than unnecessary optimization.


Engineering Decision

Progressive Search Strategy

Status: Accepted

Decision

Rundown adopts a progressive search strategy:

  1. PostgreSQL Search

  2. Meilisearch (when justified)

  3. Enterprise search platforms only for exceptional cases

Reasoning

This approach:


Search Checklist

Before implementing search, verify:


Summary

Search should evolve with the application's needs.

By adopting a progressive strategy, Rundown applications remain simple for smaller projects while retaining a clear upgrade path for larger systems.