| mapped_pages | |||
|---|---|---|---|
| applies_to |
|
:::{note} This page focuses on the semantic search workflows available in {{es}}. For detailed information about lower-level vector search implementations, refer to vector search. :::
{{es}} provides various semantic search capabilities using natural language processing (NLP) and vector search.
Learn more about use cases for AI-powered search in the overview page.
You have several options for using NLP models for semantic search in the {{stack}}:
- Option 1: Use the
semantic_textworkflow (recommended) - Option 2: Use the {{infer}} API workflow
- Option 3: Deploy models directly in {{es}}
This diagram summarizes the relative complexity of each workflow:
:::{image} /solutions/images/elasticsearch-reference-semantic-options.svg :alt: Overview of semantic search workflows in {{es}} :::
The simplest way to use NLP models in the {{stack}} is through the semantic_text workflow. We recommend using this approach because it abstracts away a lot of manual work. All you need to do is create an {{infer}} endpoint and an index mapping to start ingesting, embedding, and querying data. There is no need to define model-related settings and parameters, or to create {{infer}} ingest pipelines. For more information about the supported services, refer to and the {{infer}} API documentation .
For an end-to-end tutorial, refer to Semantic search with semantic_text.
The {{infer}} API workflow is more complex but offers greater control over the {{infer}} endpoint configuration. You need to create an {{infer}} endpoint, provide various model-related settings and parameters, define an index mapping, and set up an {{infer}} ingest pipeline with the appropriate settings.
For an end-to-end tutorial, refer to Semantic search with the {{infer}} API.
You can also deploy NLP in {{es}} manually, without using an {{infer}} endpoint. This is the most complex and labor intensive workflow for performing semantic search in the {{stack}}. You need to select an NLP model from the list of supported dense and sparse vector models, deploy it using the Eland client, create an index mapping, and set up a suitable ingest pipeline to start ingesting and querying data.
For an end-to-end tutorial, refer to Semantic search with a model deployed in {{es}}.
::::{tip} Refer to vector queries and field types for a quick reference overview. ::::
- The
elasticsearch-labsrepo contains a number of interactive semantic search examples in the form of executable Python notebooks, using the {{es}} Python client - Semantic search with ELSER using the model deployment workflow
- Semantic search with
semantic_text