You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -21,17 +21,27 @@ For a hands-on tutorial check out [Search and filter with {{esql}}](elasticsearc
21
21
22
22
## {{esql}} search quick reference
23
23
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
+
:::
25
29
26
30
| Feature | Description | Available since |
27
31
|---------|-------------|----------------|
28
32
|[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 |
30
34
|[Relevance scoring](#esql-for-search-scoring)| Calculate and sort by relevance with `METADATA _score`| 8.18/9.0 |
31
35
|[Semantic search](#semantic-search)| Perform semantic searches on `semantic_text` field types | 8.18/9.0 |
32
36
|[Hybrid search](#hybrid-search)| Combine lexical and semantic search approaches with custom weights | 8.18/9.0 |
33
37
|[Kibana Query Language](#kql-function)| Use Kibana Query Language with the `KQL` function | 8.18/9.0 |
34
38
|[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 |
@@ -84,9 +94,9 @@ Use the [`MATCH_PHRASE` function](elasticsearch://reference/query-languages/esql
84
94
85
95
For exact phrase matching rather than individual word matching, use `MATCH_PHRASE`.
86
96
87
-
### Query string (`QSTR`) function
97
+
### `QSTR` function
88
98
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.
90
100
91
101
For complete details, refer to the [Query DSL `query_string` docs](elasticsearch://reference/query-languages/query-dsl/query-dsl-query-string-query.md).
92
102
@@ -96,6 +106,18 @@ Use the [KQL function](elasticsearch://reference/query-languages/esql/functions-
96
106
97
107
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.
98
108
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
+
99
121
## Advanced search capabilities
100
122
101
123
### Semantic search
@@ -110,8 +132,25 @@ Refer to [semantic search with semantic_text](/solutions/search/semantic-search/
110
132
111
133
[Hybrid search](/solutions/search/hybrid-search.md) combines lexical and semantic search with custom weights to leverage both exact keyword matching and semantic understanding.
112
134
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
+
113
141
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).
114
142
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
+
115
154
## Next steps [esql-for-search-next-steps]
116
155
117
156
### Tutorials and how-to guides [esql-for-search-tutorials]
0 commit comments