Loading

Full-text search

Elastic Stack Serverless

Tip

Would you prefer to start with a hands-on example? Refer to our full-text search tutorial.

Full-text search, also known as lexical search, is a technique for fast, efficient searching through text fields in documents. Documents and search queries are transformed to enable returning relevant results instead of simply exact term matches. Fields of type text are analyzed and indexed for full-text search.

Built on decades of information retrieval research, full-text search delivers reliable results that scale predictably as your data grows. Because it runs efficiently on CPUs, Elasticsearch's full-text search requires minimal computational resources compared to GPU-intensive vector operations.

You can combine full-text search with semantic search using vectors to build modern hybrid search applications. While vector search may require additional GPU resources, the full-text component remains cost-effective by leveraging existing CPU infrastructure.

For a high-level overview of how full-text search works, refer to How full-text search works.

For a hands-on introduction to full-text search, refer to the full-text search tutorial.

Here are some resources to help you learn more about full-text search with Elasticsearch.

Core concepts

Learn about the core components of full-text search:

Elasticsearch query languages

Learn how to build full-text search queries using Elasticsearch's query languages:

Advanced topics

For a technical deep dive into Elasticsearch's BM25 implementation read this blog post: The BM25 Algorithm and its Variables.

To learn how to optimize the relevance of your search results, refer to Search relevance optimizations.