Skip to content

Commit 854f963

Browse files
committed
[Search] Vector & semantic search
1 parent e4abccc commit 854f963

File tree

7 files changed

+168
-129
lines changed

7 files changed

+168
-129
lines changed

images/elasticsearch-reference-semantic-options.svg

Lines changed: 1 addition & 4 deletions
Loading

raw-migrated-files/elasticsearch/elasticsearch-reference/semantic-search.md

Lines changed: 0 additions & 101 deletions
This file was deleted.

solutions/search/full-text.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,8 @@ mapped_pages:
55

66
# Full-text search [full-text-search]
77

8-
::::{admonition} Hands-on introduction to full-text search
9-
:class: tip
10-
11-
Would you prefer to jump straight into a hands-on tutorial? Refer to our quick start [full-text search tutorial](get-started.md).
12-
8+
::::{tip}
9+
Would you prefer to start with a hands-on example? Refer to our [full-text search tutorial](querydsl-full-text-filter-tutorial.md).
1310
::::
1411

1512
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](https://www.elastic.co/what-is/search-relevance) results instead of simply exact term matches. Fields of type [`text`](https://www.elastic.co/guide/en/elasticsearch/reference/current/text.html#text-field-type) are analyzed and indexed for full-text search.
Lines changed: 68 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,78 @@
1-
---
2-
mapped_urls:
3-
- https://www.elastic.co/guide/en/elasticsearch/reference/current/semantic-search.html
4-
- https://www.elastic.co/guide/en/serverless/current/elasticsearch-reference-semantic-search.html
5-
---
1+
# Semantic search [semantic-search]
62

7-
# Semantic search
3+
:::{note}
4+
This page focuses on the semantic search workflows available in {{es}}. For detailed information about vector search implementations, refer to [vector search](vector.md).
5+
:::
86

9-
% What needs to be done: Lift-and-shift
7+
Sometimes [full-text search](full-text.md) isn't enough.
108

11-
% Use migrated content from existing pages that map to this page:
9+
Semantic search techniques help users find data based on intent and contextual meaning, going beyond traditional keyword matching.
1210

13-
% - [ ] ./raw-migrated-files/elasticsearch/elasticsearch-reference/semantic-search.md
14-
% - [ ] ./raw-migrated-files/docs-content/serverless/elasticsearch-reference-semantic-search.md
11+
Semantic search has a wide range of use cases, including:
1512

16-
% Internal links rely on the following IDs being on this page (e.g. as a heading ID, paragraph ID, etc):
13+
- **Question answering**: Find the most relevant answers to user questions
14+
- **Recommendation systems**: Suggest similar items based on user preferences
15+
- **Information retrieval**: Retrieve relevant information from large datasets
16+
- **Product discovery**: Help E-commerce users find relevant products
17+
- **Workplace search**: Help employees find relevant information within an organization
1718

18-
$$$elasticsearch-reference-semantic-search-semantic-text$$$
19+
{{es}} provides various semantic search capabilities using [natural language processing (NLP)](../../raw-migrated-files/elasticsearch/explore-analyze/machine-learning/nlp.md) and [vector search](vector.md).
1920

20-
$$$elasticsearch-reference-semantic-search-inference-api$$$
21+
## Overview of semantic search workflows [semantic-search-workflows-overview]
2122

22-
$$$elasticsearch-reference-semantic-search-model-deployment$$$
23+
You have several options for using NLP models for semantic search in the {{stack}}:
2324

24-
$$$using-nlp-models$$$
25+
* Option 1: Use the `semantic_text` workflow (recommended)
26+
* Option 2: Use the {{infer}} API workflow
27+
* Option 3: Deploy models directly in {{es}}
2528

26-
$$$using-query$$$
29+
This diagram summarizes the relative complexity of each workflow:
30+
31+
:::{image} ../../../images/elasticsearch-reference-semantic-options.svg
32+
:alt: Overview of semantic search workflows in {{es}}
33+
:::
34+
35+
## Choose a semantic search workflow [using-nlp-models]
36+
37+
### Option 1: `semantic_text` [_semantic_text_workflow]
38+
39+
The simplest way to use NLP models in the {{stack}} is through the [`semantic_text` workflow](semantic-search/semantic-search-semantic-text.md). 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. Refer to the [Create an {{infer}} endpoint API](https://www.elastic.co/guide/en/elasticsearch/reference/current/put-inference-api.html) documentation for a list of supported services.
40+
41+
For an end-to-end tutorial, refer to [Semantic search with `semantic_text`](semantic-search/semantic-search-semantic-text.md).
42+
43+
44+
### Option 2: Inference API [_infer_api_workflow]
45+
46+
The [{{infer}} API workflow](inference-api.md) 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.
47+
48+
For an end-to-end tutorial, refer to [Semantic search with the {{infer}} API](inference-api.md).
49+
50+
51+
### Option 3: Manual model deployment [_model_deployment_workflow]
52+
53+
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](../../explore-analyze/machine-learning/nlp/ml-nlp-model-ref.md#ml-nlp-model-ref-text-embedding), deploy it using the Eland client, create an index mapping, and set up a suitable ingest pipeline to start ingesting and querying data.
54+
55+
For an end-to-end tutorial, refer to [Semantic search with a model deployed in {{es}}](semantic-search/semantic-search-deployed-nlp-model.md).
56+
57+
::::{tip}
58+
Refer to [vector queries and field types](vector.md#choosing-vector-query) for a quick reference overview.
59+
::::
60+
61+
## Learn more [semantic-search-read-more]
62+
63+
### Interactive examples
64+
65+
- The [`elasticsearch-labs`](https://github.com/elastic/elasticsearch-labs) repo contains a number of interactive semantic search examples in the form of executable Python notebooks, using the {{es}} Python client
66+
- [Semantic search with ELSER using the model deployment workflow](https://github.com/elastic/elasticsearch-labs/blob/main/notebooks/search/03-ELSER.ipynb)
67+
- [Semantic search with `semantic_text`](https://github.com/elastic/elasticsearch-labs/blob/main/notebooks/search/09-semantic-text.ipynb)
68+
69+
### Blogs
70+
71+
- [{{es}} new semantic_text mapping: Simplifying semantic search](https://www.elastic.co/search-labs/blog/semantic-search-simplified-semantic-text)
72+
- [Introducing Elastic Learned Sparse Encoder: Elastic's AI model for semantic search](https://www.elastic.co/blog/may-2023-launch-sparse-encoder-ai-model)
73+
- [How to get the best of lexical and AI-powered search with Elastic's vector database](https://www.elastic.co/blog/lexical-ai-powered-search-elastic-vector-database)
74+
- Information retrieval blog series:
75+
- [Part 1: Steps to improve search relevance](https://www.elastic.co/blog/improving-information-retrieval-elastic-stack-search-relevance)
76+
- [Part 2: Benchmarking passage retrieval](https://www.elastic.co/blog/improving-information-retrieval-elastic-stack-benchmarking-passage-retrieval)
77+
- [Part 3: Introducing Elastic Learned Sparse Encoder, our new retrieval model](https://www.elastic.co/blog/may-2023-launch-information-retrieval-elasticsearch-ai-model)
78+
- [Part 4: Hybrid retrieval](https://www.elastic.co/blog/improving-information-retrieval-elastic-stack-hybrid)

0 commit comments

Comments
 (0)