Skip to content

Commit fcfddc4

Browse files
authored
Merge branch 'main' into tests/fix-synonyms-it
2 parents 5744594 + a15b9dd commit fcfddc4

File tree

75 files changed

+656
-751
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+656
-751
lines changed

docs/changelog/127199.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
pr: 127199
2+
summary: Disable a bugged commit
3+
area: ES|QL
4+
type: bug
5+
issues:
6+
- 127197

docs/internal/Versioning.md

+19
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,25 @@ usually after each new minor release, to collapse the transport versions
8585
for the previous minor release. An example of such an operation can be found
8686
[here](https://github.com/elastic/elasticsearch/pull/104937).
8787

88+
#### Tips
89+
90+
- We collapse versions only on the `main` branch.
91+
- Use [TransportVersions.csv](../../server/src/main/resources/org/elasticsearch/TransportVersions.csv) as your guide.
92+
- For each release version listed in that file with a corresponding `INITIAL_ELASTICSEARCH_` entry corresponding to that version,
93+
- change the prefix to `V_`
94+
- replace all intervening entries since the previous patch `V_` entry with the new `V_` entry
95+
- look at all uses of the new `V_` entry and look for dead code that can be deleted
96+
97+
For example, if there's a version `1.2.3` in the CSV file,
98+
and `TransportVersions.java` has an entry called `INITIAL_ELASTICSEARCH_1_2_3`,
99+
then:
100+
- rename it to `V_1_2_3`,
101+
- replace any other intervening symbols between `V_1_2_2` and `V_1_2_3` with `V_1_2_3` itself, and
102+
- look through all the uses of the new `V_1_2_3` symbol; if any contain dead code, simplify it.
103+
104+
When in doubt, you can always leave the code as-is.
105+
This is an optional cleanup step that is never required for correctness.
106+
88107
### Minimum compatibility versions
89108

90109
The transport version used between two nodes is determined by the initial handshake

docs/reference/elasticsearch/command-line-tools/elasticsearch-keystore.md

+19-1
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,20 @@ Only some settings are designed to be read from the keystore. However, there is
8888
`-v, --verbose`
8989
: Shows verbose output.
9090

91+
## Handling special characters
92+
93+
:::{important}
94+
Improper handling of special characters can lead to authentication failures and service outages.
95+
:::
96+
97+
**Exclamation mark**: `!`
98+
: When using the shell, the combination `\!` is stored as just `!`. This can lead to authentication failures if the password is not stored as intended.
99+
100+
**Quotes**: `"`
101+
: If quotes are used around the password, they become part of the password itself. This can cause the password to be incorrect when retrieved from the keystore.
102+
103+
**Backslash**: `\`
104+
: The backslash character needs to be properly escaped. If not escaped correctly, it may be omitted or misinterpreted, leading to incorrect password storage.
91105

92106
## Examples [elasticsearch-keystore-examples]
93107

@@ -150,9 +164,13 @@ To pass the settings values through standard input (stdin), use the `--stdin` fl
150164
```sh
151165
cat /file/containing/setting/value | bin/elasticsearch-keystore add --stdin the.setting.name.to.set
152166
```
167+
Alternatively, you can use the echo command to input the password into the keystore. For example, if the password is `your\!password` :
153168

154-
Values for multiple settings must be separated by carriage returns or newlines.
169+
```sh
170+
echo -n 'your\!password' | bin/elasticsearch-keystore add the.setting.name.to.set
171+
```
155172

173+
Values for multiple settings must be separated by carriage returns or newlines.
156174

157175
### Add files to the keystore [add-file-to-keystore]
158176

docs/reference/elasticsearch/mapping-reference/dense-vector.md

+4-18
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ mapped_pages:
66

77
# Dense vector field type [dense-vector]
88

9-
109
The `dense_vector` field type stores dense vectors of numeric values. Dense vector fields are primarily used for [k-nearest neighbor (kNN) search](docs-content://deploy-manage/production-guidance/optimize-performance/approximate-knn-search.md).
1110

1211
The `dense_vector` type does not support aggregations or sorting.
@@ -46,7 +45,6 @@ PUT my-index/_doc/2
4645
Unlike most other data types, dense vectors are always single-valued. It is not possible to store multiple values in one `dense_vector` field.
4746
::::
4847

49-
5048
## Index vectors for kNN search [index-vectors-knn-search]
5149

5250
A *k-nearest neighbor* (kNN) search finds the *k* nearest vectors to a query vector, as measured by a similarity metric.
@@ -78,7 +76,6 @@ PUT my-index-2
7876
Indexing vectors for approximate kNN search is an expensive process. It can take substantial time to ingest documents that contain vector fields with `index` enabled. See [k-nearest neighbor (kNN) search](docs-content://deploy-manage/production-guidance/optimize-performance/approximate-knn-search.md) to learn more about the memory requirements.
7977
::::
8078

81-
8279
You can disable indexing by setting the `index` parameter to `false`:
8380

8481
```console
@@ -98,7 +95,6 @@ PUT my-index-2
9895

9996
{{es}} uses the [HNSW algorithm](https://arxiv.org/abs/1603.09320) to support efficient kNN search. Like most kNN algorithms, HNSW is an approximate method that sacrifices result accuracy for improved speed.
10097

101-
10298
## Automatically quantize vectors for kNN search [dense-vector-quantization]
10399

104100
The `dense_vector` type supports quantization to reduce the memory footprint required when [searching](docs-content://solutions/search/vector/knn.md#approximate-knn) `float` vectors. The three following quantization strategies are supported:
@@ -117,17 +113,14 @@ Quantized vectors can use [oversampling and rescoring](docs-content://solutions/
117113
Quantization will continue to keep the raw float vector values on disk for reranking, reindexing, and quantization improvements over the lifetime of the data. This means disk usage will increase by ~25% for `int8`, ~12.5% for `int4`, and ~3.1% for `bbq` due to the overhead of storing the quantized and raw vectors.
118114
::::
119115

120-
121116
::::{note}
122117
`int4` quantization requires an even number of vector dimensions.
123118
::::
124119

125-
126120
::::{note}
127121
`bbq` quantization only supports vector dimensions that are greater than 64.
128122
::::
129123

130-
131124
Here is an example of how to create a byte-quantized index:
132125

133126
```console
@@ -188,7 +181,6 @@ PUT my-byte-quantized-index
188181
}
189182
```
190183

191-
192184
## Parameters for dense vector fields [dense-vector-params]
193185

194186
The following mapping parameters are accepted:
@@ -210,7 +202,6 @@ $$$dense-vector-element-type$$$
210202

211203
::::
212204

213-
214205
`dims`
215206
: (Optional, integer) Number of vector dimensions. Can’t exceed `4096`. If `dims` is not specified, it will be set to the length of the first vector added to the field.
216207

@@ -228,7 +219,6 @@ $$$dense-vector-similarity$$$
228219
`bit` vectors only support `l2_norm` as their similarity metric.
229220
::::
230221

231-
232222
::::{dropdown} Valid values for `similarity`
233223
`l2_norm`
234224
: Computes similarity based on the L2 distance (also known as Euclidean distance) between the vectors. The document `_score` is computed as `1 / (1 + l2_norm(query, vector)^2)`.
@@ -242,7 +232,6 @@ For `bit` vectors, instead of using `l2_norm`, the `hamming` distance between th
242232

243233
When `element_type` is `byte`, all vectors must have the same length including both document and query vectors or results will be inaccurate. The document `_score` is computed as `0.5 + (dot_product(query, vector) / (32768 * dims))` where `dims` is the number of dimensions per vector.
244234

245-
246235
`cosine`
247236
: Computes the cosine similarity. During indexing {{es}} automatically normalizes vectors with `cosine` similarity to unit length. This allows to internally use `dot_product` for computing similarity, which is more efficient. Original un-normalized vectors can be still accessed through scripts. The document `_score` is computed as `(1 + cosine(query, vector)) / 2`. The `cosine` similarity does not allow vectors with zero magnitude, since cosine is not defined in this case.
248237

@@ -251,12 +240,10 @@ For `bit` vectors, instead of using `l2_norm`, the `hamming` distance between th
251240

252241
::::
253242

254-
255243
::::{note}
256244
Although they are conceptually related, the `similarity` parameter is different from [`text`](/reference/elasticsearch/mapping-reference/text.md) field [`similarity`](/reference/elasticsearch/mapping-reference/similarity.md) and accepts a distinct set of options.
257245
::::
258246

259-
260247
$$$dense-vector-index-options$$$
261248

262249
`index_options`
@@ -267,7 +254,6 @@ $$$dense-vector-index-options$$$
267254
::::{dropdown} Properties of `index_options`
268255
`type`
269256
: (Required, string) The type of kNN algorithm to use. Can be either any of:
270-
271257
* `hnsw` - This utilizes the [HNSW algorithm](https://arxiv.org/abs/1603.09320) for scalable approximate kNN search. This supports all `element_type` values.
272258
* `int8_hnsw` - The default index type for float vectors. This utilizes the [HNSW algorithm](https://arxiv.org/abs/1603.09320) in addition to automatically scalar quantization for scalable approximate kNN search with `element_type` of `float`. This can reduce the memory footprint by 4x at the cost of some accuracy. See [Automatically quantize vectors for kNN search](#dense-vector-quantization).
273259
* `int4_hnsw` - This utilizes the [HNSW algorithm](https://arxiv.org/abs/1603.09320) in addition to automatically scalar quantization for scalable approximate kNN search with `element_type` of `float`. This can reduce the memory footprint by 8x at the cost of some accuracy. See [Automatically quantize vectors for kNN search](#dense-vector-quantization).
@@ -276,17 +262,17 @@ $$$dense-vector-index-options$$$
276262
* `int8_flat` - This utilizes a brute-force search algorithm in addition to automatically scalar quantization. Only supports `element_type` of `float`.
277263
* `int4_flat` - This utilizes a brute-force search algorithm in addition to automatically half-byte scalar quantization. Only supports `element_type` of `float`.
278264
* `bbq_flat` - This utilizes a brute-force search algorithm in addition to automatically binary quantization. Only supports `element_type` of `float`.
279-
280-
265+
281266
`m`
282267
: (Optional, integer) The number of neighbors each node will be connected to in the HNSW graph. Defaults to `16`. Only applicable to `hnsw`, `int8_hnsw`, `int4_hnsw` and `bbq_hnsw` index types.
283-
268+
284269
`ef_construction`
285270
: (Optional, integer) The number of candidates to track while assembling the list of nearest neighbors for each new node. Defaults to `100`. Only applicable to `hnsw`, `int8_hnsw`, `int4_hnsw` and `bbq_hnsw` index types.
286-
271+
287272
`confidence_interval`
288273
: (Optional, float) Only applicable to `int8_hnsw`, `int4_hnsw`, `int8_flat`, and `int4_flat` index types. The confidence interval to use when quantizing the vectors. Can be any value between and including `0.90` and `1.0` or exactly `0`. When the value is `0`, this indicates that dynamic quantiles should be calculated for optimized quantization. When between `0.90` and `1.0`, this value restricts the values used when calculating the quantization thresholds. For example, a value of `0.95` will only use the middle 95% of the values when calculating the quantization thresholds (e.g. the highest and lowest 2.5% of values will be ignored). Defaults to `1/(dims + 1)` for `int8` quantized vectors and `0` for `int4` for dynamic quantile calculation.
289274

275+
290276
`rescore_vector`
291277
: (Optional, object) An optional section that configures automatic vector rescoring on knn queries for the given field. Only applicable to quantized index types.
292278
:::::{dropdown} Properties of `rescore_vector`

docs/reference/query-languages/esql/_snippets/commands/layout/lookup-join.md

+5-7
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ SLA of official GA features.
1111
index, to your {{esql}} query results, simplifying data enrichment
1212
and analysis workflows.
1313

14+
Refer to [the high-level landing page](../../../../esql/esql-lookup-join.md) for an overview of the `LOOKUP JOIN` command, including use cases, prerequisites, and current limitations.
15+
1416
**Syntax**
1517

1618
```esql
@@ -21,18 +23,14 @@ FROM <source_index>
2123
**Parameters**
2224

2325
`<lookup_index>`
24-
: The name of the lookup index. This must be a specific index name - wildcards, aliases, and remote cluster
25-
references are not supported.
26+
: The name of the lookup index. This must be a specific index name - wildcards, aliases, and remote cluster references are not supported. Indices used for lookups must be configured with the [`lookup` index mode](/reference/elasticsearch/index-settings/index-modules.md#index-mode-setting).
2627

2728
`<field_name>`
28-
: The field to join on. This field must exist
29-
in both your current query results and in the lookup index. If the field
30-
contains multi-valued entries, those entries will not match anything
31-
(the added fields will contain `null` for those rows).
29+
: The field to join on. This field must exist in both your current query results and in the lookup index. If the field contains multi-valued entries, those entries will not match anything (the added fields will contain `null` for those rows).
3230

3331
**Description**
3432

35-
The `LOOKUP JOIN` command adds new columns to your {esql} query
33+
The `LOOKUP JOIN` command adds new columns to your {{esql}} query
3634
results table by finding documents in a lookup index that share the same
3735
join field value as your result rows.
3836

0 commit comments

Comments
 (0)