Skip to content

Commit 6688527

Browse files
Merge branch 'main' into fix-syntax-rendering-errors
2 parents 910b331 + 0483056 commit 6688527

File tree

13 files changed

+531
-11
lines changed

13 files changed

+531
-11
lines changed

deploy-manage/tools/snapshot-and-restore/read-only-url-repository.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ PUT _snapshot/my_read_only_url_repository
4242
: (Optional, Boolean) If `true`, metadata files, such as index mappings and settings, are compressed in snapshots. Data files are not compressed. Defaults to `true`.
4343

4444
`max_number_of_snapshots`
45-
: (Optional, integer) Maximum number of snapshots the repository can contain. Defaults to `Integer.MAX_VALUE`, which is `2^31-1` or `2147483647`.
45+
: (Optional, integer) Maximum number of snapshots the repository can contain. Defaults to `Integer.MAX_VALUE`, which is `2`^`31`^`-1` or `2147483647`.
4646

4747
`max_restore_bytes_per_sec`
4848
: (Optional, [byte value](elasticsearch://reference/elasticsearch/rest-apis/api-conventions.md#byte-units)) Maximum snapshot restore rate per node. Defaults to unlimited. Note that restores are also throttled through [recovery settings](elasticsearch://reference/elasticsearch/configuration-reference/index-recovery-settings.md).

deploy-manage/tools/snapshot-and-restore/shared-file-system-repository.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ PUT _snapshot/my_fs_backup
148148
: (Required, string) Location of the shared filesystem used to store and retrieve snapshots. This location must be registered in the `path.repo` setting on all master and data nodes in the cluster. Unlike `path.repo`, this setting supports only a single file path.
149149

150150
`max_number_of_snapshots`
151-
: (Optional, integer) Maximum number of snapshots the repository can contain. Defaults to `Integer.MAX_VALUE`, which is `2^31-1` or `2147483647`.
151+
: (Optional, integer) Maximum number of snapshots the repository can contain. Defaults to `Integer.MAX_VALUE`, which is `2`^`31`^`-1` or `2147483647`.
152152

153153
`max_restore_bytes_per_sec`
154154
: (Optional, [byte value](elasticsearch://reference/elasticsearch/rest-apis/api-conventions.md#byte-units)) Maximum snapshot restore rate per node. Defaults to unlimited. Note that restores are also throttled through [recovery settings](elasticsearch://reference/elasticsearch/configuration-reference/index-recovery-settings.md).

deploy-manage/tools/snapshot-and-restore/source-only-repository.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ PUT _snapshot/my_src_only_repository
5353

5454

5555
`max_number_of_snapshots`
56-
: (Optional, integer) Maximum number of snapshots the repository can contain. Defaults to `Integer.MAX_VALUE`, which is `2^31-1` or `2147483647`.
56+
: (Optional, integer) Maximum number of snapshots the repository can contain. Defaults to `Integer.MAX_VALUE`, which is `2`^`31`^`-1` or `2147483647`.
5757

5858
`max_restore_bytes_per_sec`
5959
: (Optional, [byte value](elasticsearch://reference/elasticsearch/rest-apis/api-conventions.md#byte-units)) Maximum snapshot restore rate per node. Defaults to unlimited. Note that restores are also throttled through [recovery settings](elasticsearch://reference/elasticsearch/configuration-reference/index-recovery-settings.md).

explore-analyze/query-filter/aggregations.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,4 +294,4 @@ For faster responses, {{es}} caches the results of frequently run aggregations i
294294

295295
## Limits for `long` values [limits-for-long-values]
296296

297-
When running aggregations, {{es}} uses [`double`](elasticsearch://reference/elasticsearch/mapping-reference/number.md) values to hold and represent numeric data. As a result, aggregations on [`long`](elasticsearch://reference/elasticsearch/mapping-reference/number.md) numbers greater than `253` are approximate.
297+
When running aggregations, {{es}} uses [`double`](elasticsearch://reference/elasticsearch/mapping-reference/number.md) values to hold and represent numeric data. As a result, aggregations on [`long`](elasticsearch://reference/elasticsearch/mapping-reference/number.md) numbers greater than `2`^`53`^ are approximate.

solutions/search/using-resolve-cluster-endpoint-before-cross-cluster-search.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,19 @@ mapped_pages:
33
- https://www.elastic.co/guide/en/elasticsearch/reference/current/_advantages_of_using_this_endpoint_before_a_cross_cluster_search.html
44
applies_to:
55
stack:
6-
serverless:
6+
serverless: unavailable
77
---
88

9-
# Advantages of using this endpoint before a {{ccs}} [_advantages_of_using_this_endpoint_before_a_ccs]
9+
# Resolve a cluster before {{ccs}} [_advantages_of_using_this_endpoint_before_a_ccs]
10+
11+
You can use the [`_resolve/cluster`](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-resolve-cluster) endpoint before cross-cluster search to identify clusters or indices to exclude from your search.
1012

1113
You may want to exclude a cluster or index from a search when:
1214

13-
1. A remote cluster could not be connected to and is configured with `skip_unavailable`=`false`. Executing a {{ccs}} under those conditions will cause [the entire search to fail](/solutions/search/cross-cluster-search.md#cross-cluster-search-failures).
14-
2. A cluster has no matching indices, aliases or data streams for the index expression (or your user does not have permissions to search them). For example, suppose your index expression is `logs*,remote1:logs*` and the `remote1` cluster has no indices, aliases or data streams that match `logs*`. In that case, that cluster will return no results from that cluster if you include it in a {{ccs}}.
15-
3. The index expression (combined with any query parameters you specify) will likely cause an exception to be thrown when you do the search. In these cases, the "error" field in the `_resolve/cluster` response will be present. (This is also where security/permission errors will be shown.)
16-
4. A remote cluster is an older version that does not support the feature you want to use in your search.
15+
1. A remote cluster is unavailable and configured with `skip_unavailable`=`false`. Executing a {{ccs}} under those conditions will cause [the entire search to fail](/solutions/search/cross-cluster-search.md#cross-cluster-search-failures).
16+
2. A cluster has no matching indices, aliases or data streams for the index expression, or your user does not have permissions to search them. For example, if your index expression is `logs*,remote1:logs*` and the `remote1` cluster has no matching indices, that cluster will return no results if included in a {{ccs}}.
17+
3. The index expression, combined with any query parameters you specify, might trigger exceptions. In these cases, the "error" field in the `_resolve/cluster` response will be present. This is also where security/permission errors will be shown.
18+
4. A remote cluster is running an older version that does not support features needed for your search.
1719

1820
## {{api-examples-title}} [resolve-cluster-api-example]
1921

solutions/search/vector/knn.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -915,7 +915,7 @@ All forms of quantization will result in some accuracy loss and as the quantizat
915915
* `int4` requires some rescoring for higher accuracy and larger recall scenarios. Generally, oversampling by 1.5x-2x recovers most of the accuracy loss.
916916
* `bbq` requires rescoring except on exceptionally large indices or models specifically designed for quantization. We have found that between 3x-5x oversampling is generally sufficient. But for fewer dimensions or vectors that do not quantize well, higher oversampling may be required.
917917

918-
You can use the `rescore_vector` [preview] option to automatically perform reranking. When a rescore `oversample` parameter is specified, the approximate kNN search will:
918+
You can use the [`rescore_vector` option](https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-search#operation-search-body-application-json-knn-rescore_vector) to automatically perform reranking. When a rescore `oversample` parameter is specified, the approximate kNN search will:
919919

920920
* Retrieve `num_candidates` candidates per shard.
921921
* From these candidates, the top `k * oversample` candidates per shard will be rescored using the original vectors.
Lines changed: 199 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,199 @@
1+
---
2+
applies_to:
3+
stack:
4+
deployment:
5+
eck:
6+
ess:
7+
ece:
8+
self:
9+
navigation_title: "Error: All shards failed"
10+
---
11+
12+
# Fix error: All shards failed [all-shards-failed]
13+
14+
```console
15+
Error: all shards failed
16+
```
17+
18+
The `all shards failed` error indicates that {{es}} couldn't get a successful response from any of the shards involved in the query. Possible causes include shard allocation issues, misconfiguration, insufficient resources, or unsupported operations such as aggregating on text fields.
19+
20+
## Unsupported operations on text fields
21+
22+
The `all shards failed` error can occur when you try to sort or aggregate on `text` fields. These fields are designed for full-text search and don't support exact-value operations like sorting and aggregation.
23+
24+
To fix this issue, use a `.keyword` subfield:
25+
26+
```console
27+
GET my-index/_search
28+
{
29+
"aggs": {
30+
"names": {
31+
"terms": {
32+
"field": "name.keyword"
33+
}
34+
}
35+
}
36+
}
37+
```
38+
39+
If no `.keyword` subfield exists, define a [multi-field](elasticsearch://reference/elasticsearch/mapping-reference/field-data-types.md#types-multi-fields) mapping:
40+
41+
```console
42+
PUT my-index
43+
{
44+
"mappings": {
45+
"properties": {
46+
"name": {
47+
"type": "text",
48+
"fields": {
49+
"keyword": {
50+
"type": "keyword"
51+
}
52+
}
53+
}
54+
}
55+
}
56+
}
57+
```
58+
59+
### Metric aggregations on text fields
60+
61+
The `all shards failed` error can also occur when you use a metric aggregation on a text field. [Metric aggregations](elasticsearch://reference/aggregations/metrics.md) require numeric fields.
62+
63+
You can use a script to convert the text value to a number at query time:
64+
65+
```console
66+
GET my-index/_search
67+
{
68+
"aggs": {
69+
"total_cost": {
70+
"sum": {
71+
"script": {
72+
"source": "Integer.parseInt(doc.cost.value)"
73+
}
74+
}
75+
}
76+
}
77+
}
78+
```
79+
80+
Or change the field mapping to a numeric type:
81+
82+
```console
83+
PUT my-index
84+
{
85+
"mappings": {
86+
"properties": {
87+
"cost": {
88+
"type": "integer"
89+
}
90+
}
91+
}
92+
}
93+
```
94+
95+
## Failed shard recovery
96+
97+
A shard failure during recovery can prevent successful queries.
98+
99+
To identify the cause, check the cluster health:
100+
101+
```console
102+
GET _cluster/health
103+
```
104+
105+
As a last resort, you can delete the problematic index.
106+
107+
## Misused global aggregation
108+
109+
[Global aggregations](elasticsearch://reference/aggregations/search-aggregations-bucket-global-aggregation.md) must be defined at the top level of the aggregations object. Nesting can cause errors.
110+
111+
To fix this issue, structure the query so that the `global` aggregation appears at the top level:
112+
113+
```console
114+
GET my-index/_search
115+
{
116+
"size": 0,
117+
"aggs": {
118+
"all_products": {
119+
"global": {},
120+
"aggs": {
121+
"genres": {
122+
"terms": {
123+
"field": "cost"
124+
}
125+
}
126+
}
127+
}
128+
}
129+
}
130+
```
131+
132+
## Reverse_nested usage errors
133+
134+
Using a [`reverse_nested`](elasticsearch://reference/aggregations/search-aggregations-bucket-reverse-nested-aggregation.md) aggregation outside of a `nested` context causes errors.
135+
136+
To fix this issue, structure the query so that the `reverse_nested` aggregation is inside a `nested` aggregation:
137+
138+
```console
139+
GET my-index/_search
140+
{
141+
"aggs": {
142+
"comments": {
143+
"nested": {
144+
"path": "comments"
145+
},
146+
"aggs": {
147+
"top_usernames": {
148+
"terms": {
149+
"field": "comments.username"
150+
},
151+
"aggs": {
152+
"comment_issue": {
153+
"reverse_nested": {},
154+
"aggs": {
155+
"top_tags": {
156+
"terms": {
157+
"field": "tags"
158+
}
159+
}
160+
}
161+
}
162+
}
163+
}
164+
}
165+
}
166+
}
167+
}
168+
```
169+
170+
## Further troubleshooting
171+
172+
Use the `_cat/shards` API to view shard status and troubleshoot further.
173+
174+
```console
175+
GET _cat/shards
176+
```
177+
178+
For a specific index:
179+
180+
```console
181+
GET _cat/shards/my-index
182+
```
183+
184+
Example output:
185+
186+
```console-result
187+
my-index 5 p STARTED 0 283b 127.0.0.1 ziap
188+
my-index 5 r UNASSIGNED
189+
my-index 2 p STARTED 1 3.7kb 127.0.0.1 ziap
190+
my-index 2 r UNASSIGNED
191+
my-index 3 p STARTED 3 7.2kb 127.0.0.1 ziap
192+
my-index 3 r UNASSIGNED
193+
my-index 1 p STARTED 1 3.7kb 127.0.0.1 ziap
194+
my-index 1 r UNASSIGNED
195+
my-index 4 p STARTED 2 3.8kb 127.0.0.1 ziap
196+
my-index 4 r UNASSIGNED
197+
my-index 0 p STARTED 0 283b 127.0.0.1 ziap
198+
my-index 0 r UNASSIGNED
199+
```
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
navigation_title: Error reference
3+
---
4+
5+
# Troubleshoot common errors in {{es}}
6+
7+
Use the topics in this section to troubleshoot common errors in {{es}} deployments.
8+
9+
* [](/troubleshoot/elasticsearch/all-shards-failed.md)
10+
* [](/troubleshoot/elasticsearch/failed-to-parse-field-of-type.md)
11+
* [](/troubleshoot/elasticsearch/unable-to-retrieve-node-fs-stats.md)
12+
* [](/troubleshoot/elasticsearch/unable-to-parse-response-body.md)
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
---
2+
applies_to:
3+
stack:
4+
deployment:
5+
eck:
6+
ess:
7+
ece:
8+
self:
9+
navigation_title: "Error: Failed to parse field of type in document with id"
10+
---
11+
12+
# Fix error: Failed to parse field [failed-to-parse-field-of-type]
13+
14+
```console
15+
Error: failed to parse field [field] of type [type] in document with id [id]
16+
```
17+
18+
This error occurs when you try to index a document, but one of the field values doesn't match the expected data type. {{es}} rejects the document when it encounters incompatible values, like a string in a numeric field or an invalid IP address.
19+
20+
To fix this issue, make sure each field value matches the data type defined in the mapping.
21+
22+
## Field types and mapping
23+
24+
When no explicit mapping exists, {{es}} uses [dynamic mappings](../../manage-data/data-store/mapping/dynamic-field-mapping.md) to infer a field's type based on the **first value indexed**.
25+
26+
For example, if you index:
27+
28+
```console
29+
PUT test/_doc/1
30+
{
31+
"ip_address": "179.152.62.82",
32+
"boolean_field": "off"
33+
}
34+
```
35+
36+
Without explicit mapping, {{es}} will treat `ip_address` and `boolean_field` as `text`, which might not be the intended result.
37+
38+
To avoid this, define the mapping explicitly:
39+
40+
```console
41+
PUT test
42+
{
43+
"mappings": {
44+
"properties": {
45+
"ip_address": { "type": "ip" },
46+
"boolean_field": { "type": "boolean" }
47+
}
48+
}
49+
}
50+
```
51+
52+
To check the data type of the field causing the error, first get the mapping:
53+
54+
```console
55+
GET your-index-name/_mapping
56+
```
57+
58+
Make sure the incoming data matches the expected type. If not, you'll need to fix the data or update the mapping. If necessary, create a new index with the correct mapping and reindex your data.

0 commit comments

Comments
 (0)