Data & Integrity

Search & Indexing

Intermediate

Letting users search across customers, cases, or transactions is genuinely useful and quietly risky. A search index is a second copy of your data, with the same sensitivity and tenancy rules, and naive search is a performance and injection hazard. Build search that is tenant-scoped, access-controlled, and efficient. The index inherits every obligation the source data has.

Search is usually backed by either the database (full-text indexes) or a dedicated search engine. Either way, the key points are: the index is a copy of sensitive data that must be protected and tenant-isolated exactly like the source; results must be filtered by what the user is allowed to see; and search queries built from user input are an injection surface. Add the usual performance concerns (large result sets, expensive queries) and search needs careful design.

This connects Data Classification (the index has the same sensitivity), Multi-Tenancy (results scoped per tenant and user), Trust Boundaries (query input), and Performance.

Keep search safe and scoped

Keep it correct and fast

Self-review checklist

Why it matters: Search indexes are an often-overlooked copy of sensitive data, and search endpoints are an easy place to leak cross-tenant data, inject queries, or scrape at scale. Scoped, protected, safely queried, bounded search gives users a powerful feature without becoming a back door around the controls on the source data.