Skip to content

Commit 493ad5d

Browse files
authored
Update ESQL for search landing page for 9.2 (#3523)
Contributes to #3250
1 parent 4d6c32f commit 493ad5d

File tree

1 file changed

+45
-6
lines changed

1 file changed

+45
-6
lines changed

solutions/search/esql-for-search.md

Lines changed: 45 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
mapped_pages:
33
- https://www.elastic.co/guide/en/elasticsearch/reference/8.18/esql-for-search.html
44
applies_to:
5-
stack: preview 9.0, ga 9.1
6-
serverless: ga
5+
stack:
6+
serverless:
77
products:
88
- id: elasticsearch
99
---
@@ -21,17 +21,27 @@ For a hands-on tutorial check out [Search and filter with {{esql}}](elasticsearc
2121

2222
## {{esql}} search quick reference
2323

24-
The following table summarizes the key search features available in [{{esql}}](elasticsearch://reference/query-languages/esql.md) and when they were introduced, organized chronologically by release.
24+
The following table summarizes the key search features available in [{{esql}}](elasticsearch://reference/query-languages/esql.md) and when they were introduced, organized chronologically by their stack version availability.
25+
26+
:::{note}
27+
Features are usually available on {{serverless-full}} before stack-versioned deployments.
28+
:::
2529

2630
| Feature | Description | Available since |
2731
|---------|-------------|----------------|
2832
| [Match function/operator](#match-function-and-operator) | Perform basic text searches with `MATCH` function or match operator (`:`) | 8.17 |
29-
| [Query string function](#query-string-qstr-function) | Execute complex queries with `QSTR` using Query String syntax | 8.17 |
33+
| [Query string function](#qstr-function) | Execute complex queries with `QSTR` using Query String syntax | 8.17 |
3034
| [Relevance scoring](#esql-for-search-scoring) | Calculate and sort by relevance with `METADATA _score` | 8.18/9.0 |
3135
| [Semantic search](#semantic-search) | Perform semantic searches on `semantic_text` field types | 8.18/9.0 |
3236
| [Hybrid search](#hybrid-search) | Combine lexical and semantic search approaches with custom weights | 8.18/9.0 |
3337
| [Kibana Query Language](#kql-function) | Use Kibana Query Language with the `KQL` function | 8.18/9.0 |
3438
| [Match phrase function](#match_phrase-function) | Perform phrase matching with `MATCH_PHRASE` function | 8.19/9.1 |
39+
| [FORK command](#fork-and-fuse) | Create multiple execution branches to operate on the same input data | 8.19/9.1 |
40+
| [FUSE command](#fork-and-fuse) | Combine and score results from multiple queries for hybrid search | 9.2 |
41+
| [KNN function](#knn-function) | Find k nearest vectors using approximate search on indexed fields | 9.2 |
42+
| [RERANK command](#semantic-reranking-with-rerank) | Re-score search results using inference models for improved relevance | 9.2 |
43+
| [COMPLETION command](#text-generation-with-completion) | Perform arbitrary text generation tasks by calling LLMs | 9.2 |
44+
| [TEXT_EMBEDDING function](#text_embedding-function) | Generate dense vector embeddings using inference endpoints | 9.3 |
3545

3646
## How search works in {{esql}}
3747

@@ -84,9 +94,9 @@ Use the [`MATCH_PHRASE` function](elasticsearch://reference/query-languages/esql
8494

8595
For exact phrase matching rather than individual word matching, use `MATCH_PHRASE`.
8696

87-
### Query string (`QSTR`) function
97+
### `QSTR` function
8898

89-
The [`qstr` function](elasticsearch://reference/query-languages/esql/functions-operators/search-functions.md#esql-qstr) provides the same functionality as the Query DSL's `query_string` query. This enables advanced search patterns with wildcards, boolean logic, and multi-field searches.
99+
The [`QSTR` function](elasticsearch://reference/query-languages/esql/functions-operators/search-functions.md#esql-qstr) provides the same functionality as the Query DSL's `query_string` query. This enables advanced search patterns with wildcards, boolean logic, and multi-field searches.
90100

91101
For complete details, refer to the [Query DSL `query_string` docs](elasticsearch://reference/query-languages/query-dsl/query-dsl-query-string-query.md).
92102

@@ -96,6 +106,18 @@ Use the [KQL function](elasticsearch://reference/query-languages/esql/functions-
96106

97107
For migrating queries from other Kibana interfaces, the `KQL` function preserves existing query syntax and allows gradual migration to {{esql}} without rewriting existing Kibana queries.
98108

109+
### `KNN` function
110+
111+
The [`KNN` function](elasticsearch://reference/query-languages/esql/functions-operators/dense-vector-functions.md#esql-knn) finds the k nearest vectors to a query vector, as measured by a similarity metric. It performs approximate search on indexed `dense_vector` or `semantic_text` fields.
112+
113+
Use `KNN` for vector similarity search use cases, such as finding semantically similar documents or implementing recommendation systems based on vector embeddings.
114+
115+
### `TEXT_EMBEDDING` function
116+
117+
The [`TEXT_EMBEDDING` function](elasticsearch://reference/query-languages/esql/functions-operators/dense-vector-functions.md#esql-text_embedding) generates dense vector embeddings from text input using a specified inference endpoint.
118+
119+
Use `TEXT_EMBEDDING` to generate query vectors for KNN searches against your vectorized data or for other dense vector based operations.
120+
99121
## Advanced search capabilities
100122

101123
### Semantic search
@@ -110,8 +132,25 @@ Refer to [semantic search with semantic_text](/solutions/search/semantic-search/
110132

111133
[Hybrid search](/solutions/search/hybrid-search.md) combines lexical and semantic search with custom weights to leverage both exact keyword matching and semantic understanding.
112134

135+
#### `FORK` and `FUSE`
136+
137+
The [`FORK`](elasticsearch://reference/query-languages/esql/commands/fork.md) and [`FUSE`](elasticsearch://reference/query-languages/esql/commands/fuse.md) commands work together to enable hybrid search in {{esql}}.
138+
139+
`FORK` creates multiple execution branches that operate on the same input data. `FUSE` then combines and scores the results from these branches. Together, these commands allow you to execute different search strategies (such as lexical and semantic searches) in parallel and merge their results with proper relevance scoring.
140+
113141
Refer to [hybrid search with semantic_text](hybrid-semantic-text.md) for an example or follow the [tutorial](elasticsearch://reference/query-languages/esql/esql-search-tutorial.md#step-5-semantic-search-and-hybrid-search).
114142

143+
### Text generation with `COMPLETION`
144+
145+
The [`COMPLETION` command](elasticsearch://reference/query-languages/esql/commands/completion.md) sends prompts to a Large Language Model (LLM) for text generation tasks.
146+
147+
Use `COMPLETION` for question answering, summarization, translation, or other AI-powered text generation.
148+
149+
150+
### Semantic reranking with `RERANK`
151+
152+
Use the [`RERANK` command](elasticsearch://reference/query-languages/esql/commands/rerank.md) to re-score search results using inference models for improved relevance.
153+
115154
## Next steps [esql-for-search-next-steps]
116155

117156
### Tutorials and how-to guides [esql-for-search-tutorials]

0 commit comments

Comments
 (0)