Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Search Indexing?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/ansh44233-search-indexing)
---
description: Add search with Postgres full-text, Elasticsearch/OpenSearch, Meilisearch or Typesense, kept in sync with the source of truth
profile: full
tags: search, elasticsearch, database
---
# Search indexing
Start with the simplest engine that meets relevance needs; Postgres full-text often suffices.
## Index design
- Index only fields you search, filter or sort on; map types explicitly (keyword vs text).
- Analyzers match the language; test relevance with real queries.
## Sync
- The database is the source of truth; update the index from change events or an outbox, never only from the request path.
- Support a full reindex into a new index plus alias swap, with zero downtime.
## Safety
- Filter by tenant and permissions inside the search query, not after.
- Escape or use structured queries; never pass raw user input as query DSL.
## Verify
A test creates, updates and deletes a record and asserts search results follow; a reindex script runs on a fresh index.