Modern search systems rarely rely on a single technique. Eugene Yan's overview walks through three families of query matching: lexical, graph-based, and embedding methods. Each approaches the core problem differently — deciding whether a query and a document are about the same thing.
Lexical methods, such as BM25, match on exact term overlap. They are simple, fast, and well understood, making them a strong baseline. Their weakness is well known: they struggle with synonyms, word order, and paraphrases. Graph methods add structure, using relationships between terms or entities (for example, a knowledge graph) to bridge gaps that exact matching misses. Embedding methods go further by mapping queries and documents into a shared vector space, so semantic similarity is captured even with zero shared vocabulary.
The three approaches are not mutually exclusive; in practice, many systems combine them, using lexical methods for precision and embeddings for recall. The main differences are cost and complexity — lexical is cheap, embeddings need infrastructure for indexing and inference, and graphs require building and maintaining the underlying relationships. Yan's examples from industry search show that the right choice depends on the data, the query distribution, and the acceptable latency budget.