# Lexical search

See how lexical search matches text terms and why codes, names, and word variants require attention to the search configuration.

Canonical URL: https://thecompanybrain.com.br/en/glossary/lexical-search
Authors: Luiz Gardelin
Updated: 2026-11-14T22:28:46.786Z

Lexical search is search based on the text terms in a query and in documents. Microsoft's hybrid search documentation describes it as keyword or full-text search, in contrast with matching by vector similarity. The source identifies queries involving codes, names, dates, and specialized vocabulary as situations in which textual matching can be useful. [Microsoft, text and vector search](https://learn.microsoft.com/en-us/azure/search/hybrid-search-overview).

## What term matching means

Lexical does not necessarily mean comparing an entire phrase character by character. Behavior depends on how the search engine processes text. Its treatment of punctuation, word forms, and other variations needs to be checked. Two tools described as keyword search can return different results for the same query; the label does not replace examination of their configuration.

In a hypothetical example, a maintenance team needs the procedure for equipment identified as “AB-204.” The code distinguishes it from other equipment with similar names. Search that preserves the identifier may help locate the correct manual. If processing splits the code in an unexpected way, the results may include documents for different equipment. Testing should use the actual identifier in the form people enter it.

[Semantic search](/en/glossary/semantic-search) considers relationships of meaning, while lexical search relies on text terms. This distinction does not establish a mandatory hierarchy. In the example, recognizing a similar subject does not compensate for confusing a code. For another task, requiring the same words could miss instructions written with different vocabulary. [Hybrid search](/en/glossary/hybrid-search) offers one way to combine methods, depending on the implementation. [Microsoft, combining search methods](https://learn.microsoft.com/en-us/azure/search/hybrid-search-overview).

## Limits when evaluating results

A textual match establishes that content meets the engine's matching criteria, not that it resolves the work-related need. A withdrawn manual may repeat the correct code. A draft may mention the right name without recording an approved decision. The reader still needs to distinguish the document's type, version, and purpose.

When evaluating lexical search, it helps to separate identifier lookups from broad questions about a subject. In the hypothetical example, the review would check whether the current manual appears, whether documents for other codes occupy the first positions, and whether access follows the user's role. These conditions describe the task more precisely than a general requirement to find matching words. They also make it possible to investigate a failed search without assuming that a different retrieval method will automatically solve it.

## Sources

- [Hybrid search using vectors and full-text search](https://learn.microsoft.com/en-us/azure/search/hybrid-search-overview): Illustrates combining text and vector search; fusion methods and results depend on implementation and task.

## Related reading

- [Semantic search](/en/glossary/semantic-search)
- [Hybrid search](/en/glossary/hybrid-search)
- [Search relevance](/en/glossary/search-relevance)
- [Access control](/en/glossary/access-control)
- [Access permission](/en/glossary/access-permission)
- [Chunk overlap](/en/glossary/chunk-overlap)
