Search is a read path over a derived index. The primary database remains the source of truth. Every write to a conversation, customer or invoice emits a change event in the same transaction. An indexer consumes those events and updates an inverted index, so a committed change is searchable within five seconds.
A query runs in three stages. Retrieval looks up each term in the index and returns candidate record IDs. Access filtering intersects the candidates with the set of records the caller may open, using permission data stored with each posting, so a record the caller cannot open is never ranked, counted or returned. Ranking scores what remains by term match, field weight and recency, and returns the top twenty.
The latency budget is 100 ms at the 95th percentile, measured at the API. Retrieval and filtering run in memory on the index nodes. The primary database is not read during a query. The client debounces keystrokes by 60 ms and cancels requests that have been superseded.
If the indexer falls behind, responses carry the index timestamp and the client marks results as possibly stale. If the index is unavailable, search returns an error. It does not fall back to a database scan. Deletes are written to the index as tombstones before the delete is acknowledged.
One decision is open: whether archived conversations are searchable by default.