What is Keyword Search?
Also called lexical search, full-text search.
Keyword search retrieves documents that literally contain the terms in a query, ranking them by scoring functions that weigh term frequency and rarity. It is the oldest form of text retrieval and still the most predictable, because a user can see exactly why a result matched. Modern retrieval stacks keep it alongside embedding based search rather than replacing it.
A keyword system processes text through an analysis chain before indexing: splitting into tokens, lowercasing, removing or keeping stop words, and reducing words to stems or lemmas. The same chain runs over the query so both sides agree on what a term is. Choices in that chain have large practical effects, since aggressive stemming can merge distinct technical terms while no stemming can miss simple plurals.
Query syntax gives users control that embedding search cannot easily offer. Phrase quoting, boolean operators, field restrictions, wildcards, and proximity constraints all express precise intent. For expert users searching a corpus whose vocabulary they know, this precision often beats semantic matching, and it is the reason legal, medical, and code search interfaces still expose lexical operators.
The persistent limitation is vocabulary mismatch: a document that expresses the right idea in different words scores zero on the terms that matter. Synonym dictionaries and query expansion help, but they are maintenance burdens and can introduce false matches. The failure is silent, since the user sees a short result list without any signal that a relevant document was phrased differently.
Because the strengths and weaknesses are close to the mirror image of dense retrieval, most current systems run both and merge the results. The lexical branch guarantees that exact identifiers and quoted phrases are never missed, while the embedding branch covers paraphrase. Keeping the lexical branch is also a hedge, since it keeps working when an embedding model is swapped or unavailable.
Key points
- Matches literal terms after a shared analysis chain
- Supports phrases, boolean logic, fields, and wildcards
- Results are easy to explain and audit
- Misses documents that use different wording
- Kept as a branch in hybrid retrieval for exactness
In practice
A compliance analyst searches an archive for the exact phrase material adverse change, restricted to the clauses field of contracts signed after January. Keyword search returns the eleven contracts containing that phrase, in that field, in that window. A semantic search would surface loosely related risk language too, which is precisely what the analyst does not want when checking for a specific clause.