Skip to content

Commit a75daef

Browse files
authored
Merge branch 'main' into main
2 parents b98701b + 8ef0490 commit a75daef

File tree

117 files changed

+6757
-290
lines changed

Some content is hidden

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

117 files changed

+6757
-290
lines changed

.github/PULL_REQUEST_TEMPLATE.md

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ _Describe what this change achieves._
44
### Issues Resolved
55
_List any issues this PR will resolve, e.g. Closes [...]._
66

7+
### Version
8+
_List the OpenSearch version to which this PR applies, e.g. 2.14, 2.12--2.14, or all._
79

810
### Checklist
911
- [ ] By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and subject to the [Developers Certificate of Origin](https://github.com/opensearch-project/OpenSearch/blob/main/CONTRIBUTING.md#developer-certificate-of-origin).

.github/vale/styles/Vocab/OpenSearch/Products/accept.txt

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Amazon SageMaker
88
Ansible
99
Auditbeat
1010
AWS Cloud
11+
Cohere Command
1112
Cognito
1213
Dashboards Query Language
1314
Data Prepper

STYLE_GUIDE.md

+41-39
Large diffs are not rendered by default.

TERMS.md

+38-38
Large diffs are not rendered by default.

_about/version-history.md

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ OpenSearch version | Release highlights | Release date
2929
[2.0.1](https://github.com/opensearch-project/opensearch-build/blob/main/release-notes/opensearch-release-notes-2.0.1.md) | Includes bug fixes and maintenance updates for Alerting and Anomaly Detection. | 16 June 2022
3030
[2.0.0](https://github.com/opensearch-project/opensearch-build/blob/main/release-notes/opensearch-release-notes-2.0.0.md) | Includes document-level monitors for alerting, OpenSearch Notifications plugins, and Geo Map Tiles in OpenSearch Dashboards. Also adds support for Lucene 9 and bug fixes for all OpenSearch plugins. For a full list of release highlights, see the Release Notes. | 26 May 2022
3131
[2.0.0-rc1](https://github.com/opensearch-project/opensearch-build/blob/main/release-notes/opensearch-release-notes-2.0.0-rc1.md) | The Release Candidate for 2.0.0. This version allows you to preview the upcoming 2.0.0 release before the GA release. The preview release adds document-level alerting, support for Lucene 9, and the ability to use term lookup queries in document level security. | 03 May 2022
32+
[1.3.17](https://github.com/opensearch-project/opensearch-build/blob/main/release-notes/opensearch-release-notes-1.3.17.md) | Includes maintenance updates for OpenSearch security and OpenSearch Dashboards security. | 06 June 2024
3233
[1.3.16](https://github.com/opensearch-project/opensearch-build/blob/main/release-notes/opensearch-release-notes-1.3.16.md) | Includes bug fixes and maintenance updates for OpenSearch security, index management, performance analyzer, and reporting. | 23 April 2024
3334
[1.3.15](https://github.com/opensearch-project/opensearch-build/blob/main/release-notes/opensearch-release-notes-1.3.15.md) | Includes bug fixes and maintenance updates for cross-cluster replication, SQL, OpenSearch Dashboards reporting, and alerting. | 05 March 2024
3435
[1.3.14](https://github.com/opensearch-project/opensearch-build/blob/main/release-notes/opensearch-release-notes-1.3.14.md) | Includes bug fixes and maintenance updates for OpenSearch security and OpenSearch Dashboards security. | 12 December 2023

_aggregations/bucket/geohex-grid.md

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ parent: Bucket aggregations
55
grand_parent: Aggregations
66
nav_order: 85
77
redirect_from:
8+
- /opensearch/geohexgrid-agg/
9+
- /query-dsl/aggregations/geohexgrid-agg/
810
- /aggregations/geohexgrid/
911
- /query-dsl/aggregations/geohexgrid/
1012
- /query-dsl/aggregations/bucket/geohex-grid/

_aggregations/bucket/multi-terms.md

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ parent: Bucket aggregations
55
grand_parent: Aggregations
66
nav_order: 130
77
redirect_from:
8+
- /query-dsl/aggregations/bucket/multi-terms/
89
- /query-dsl/aggregations/multi-terms/
910
---
1011

_aggregations/bucket/range.md

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ parent: Bucket aggregations
55
grand_parent: Aggregations
66
nav_order: 150
77
redirect_from:
8+
- /query-dsl/aggregations/bucket/date-range/
89
- /query-dsl/aggregations/bucket/range/
910
---
1011

_aggregations/bucket/sampler.md

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ title: Sampler
44
parent: Bucket aggregations
55
grand_parent: Aggregations
66
nav_order: 170
7+
redirect_from:
8+
- /query-dsl/aggregations/bucket/diversified-sampler/
79
---
810

911
# Sampler aggregations

_aggregations/bucket/significant-terms.md

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ title: Significant terms
44
parent: Bucket aggregations
55
grand_parent: Aggregations
66
nav_order: 180
7+
redirect_from:
8+
- /query-dsl/aggregations/bucket/significant-terms/
79
---
810

911
# Significant terms aggregations

_aggregations/bucket/significant-text.md

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ title: Significant text
44
parent: Bucket aggregations
55
grand_parent: Aggregations
66
nav_order: 190
7+
redirect_from:
8+
- /query-dsl/aggregations/bucket/significant-text/
79
---
810

911
# Significant text aggregations

_aggregations/bucket/terms.md

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ title: Terms
44
parent: Bucket aggregations
55
grand_parent: Aggregations
66
nav_order: 200
7+
redirect_from:
8+
- /query-dsl/aggregations/bucket/terms/
79
---
810

911
# Terms aggregations

_aggregations/index.md

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ nav_order: 5
66
nav_exclude: true
77
permalink: /aggregations/
88
redirect_from:
9+
- /query-dsl/aggregations/aggregations/
910
- /opensearch/aggregations/
1011
- /query-dsl/aggregations/
1112
- /aggregations/index/
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,158 @@
1+
---
2+
layout: default
3+
title: Median absolute deviation
4+
parent: Metric aggregations
5+
grand_parent: Aggregations
6+
nav_order: 65
7+
redirect_from:
8+
- /query-dsl/aggregations/metric/median-absolute-deviation/
9+
---
10+
11+
# Median absolute deviation aggregations
12+
13+
The `median_absolute_deviation` metric is a single-value metric aggregation that returns a median absolute deviation field. Median absolute deviation is a statistical measure of data variability. Because the median absolute deviation measures dispersion from the median, it provides a more robust measure of variability that is less affected by outliers in a dataset.
14+
15+
Median absolute deviation is calculated as follows:<br>
16+
median_absolute_deviation = median(|X<sub>i</sub> - Median(X<sub>i</sub>)|)
17+
18+
The following example calculates the median absolute deviation of the `DistanceMiles` field in the sample dataset `opensearch_dashboards_sample_data_flights`:
19+
20+
21+
```json
22+
GET opensearch_dashboards_sample_data_flights/_search
23+
{
24+
"size": 0,
25+
"aggs": {
26+
"median_absolute_deviation_DistanceMiles": {
27+
"median_absolute_deviation": {
28+
"field": "DistanceMiles"
29+
}
30+
}
31+
}
32+
}
33+
```
34+
{% include copy-curl.html %}
35+
36+
#### Example response
37+
38+
```json
39+
{
40+
"took": 35,
41+
"timed_out": false,
42+
"_shards": {
43+
"total": 1,
44+
"successful": 1,
45+
"skipped": 0,
46+
"failed": 0
47+
},
48+
"hits": {
49+
"total": {
50+
"value": 10000,
51+
"relation": "gte"
52+
},
53+
"max_score": null,
54+
"hits": []
55+
},
56+
"aggregations": {
57+
"median_absolute_deviation_distanceMiles": {
58+
"value": 1829.8993624441966
59+
}
60+
}
61+
}
62+
```
63+
64+
### Missing
65+
66+
By default, if a field is missing or has a null value in a document, it is ignored during computation. However, you can specify a value to be used for those missing or null fields by using the `missing` parameter, as shown in the following request:
67+
68+
```json
69+
GET opensearch_dashboards_sample_data_flights/_search
70+
{
71+
"size": 0,
72+
"aggs": {
73+
"median_absolute_deviation_distanceMiles": {
74+
"median_absolute_deviation": {
75+
"field": "DistanceMiles",
76+
"missing": 1000
77+
}
78+
}
79+
}
80+
}
81+
```
82+
{% include copy-curl.html %}
83+
84+
#### Example response
85+
86+
```json
87+
{
88+
"took": 7,
89+
"timed_out": false,
90+
"_shards": {
91+
"total": 1,
92+
"successful": 1,
93+
"skipped": 0,
94+
"failed": 0
95+
},
96+
"hits": {
97+
"total": {
98+
"value": 10000,
99+
"relation": "gte"
100+
},
101+
"max_score": null,
102+
"hits": []
103+
},
104+
"aggregations": {
105+
"median_absolute_deviation_distanceMiles": {
106+
"value": 1829.6443646143355
107+
}
108+
}
109+
}
110+
```
111+
112+
### Compression
113+
114+
The median absolute deviation is calculated using the [t-digest](https://github.com/tdunning/t-digest/tree/main) data structure, which balances between performance and estimation accuracy through the `compression` parameter (default value: `1000`). Adjusting the `compression` value affects the trade-off between computational efficiency and precision. Lower `compression` values improve performance but may reduce estimation accuracy, while higher values enhance accuracy at the cost of increased computational overhead, as shown in the following request:
115+
116+
```json
117+
GET opensearch_dashboards_sample_data_flights/_search
118+
{
119+
"size": 0,
120+
"aggs": {
121+
"median_absolute_deviation_DistanceMiles": {
122+
"median_absolute_deviation": {
123+
"field": "DistanceMiles",
124+
"compression": 10
125+
}
126+
}
127+
}
128+
}
129+
```
130+
{% include copy-curl.html %}
131+
132+
#### Example response
133+
134+
```json
135+
{
136+
"took": 1,
137+
"timed_out": false,
138+
"_shards": {
139+
"total": 1,
140+
"successful": 1,
141+
"skipped": 0,
142+
"failed": 0
143+
},
144+
"hits": {
145+
"total": {
146+
"value": 10000,
147+
"relation": "gte"
148+
},
149+
"max_score": null,
150+
"hits": []
151+
},
152+
"aggregations": {
153+
"median_absolute_deviation_DistanceMiles": {
154+
"value": 1836.265614211182
155+
}
156+
}
157+
}
158+
```

_api-reference/analyze-apis.md

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ title: Analyze API
44
has_children: true
55
nav_order: 7
66
redirect_from:
7+
- /api-reference/analyze-apis/perform-text-analysis/
78
- /opensearch/rest-api/analyze-apis/
89
- /api-reference/analyze-apis/
910
---

_api-reference/document-apis/reindex.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ Your request body must contain the names of the source index and destination ind
5757

5858
Field | Description
5959
:--- | :---
60-
conflicts | Indicates to OpenSearch what should happen if the delete by query operation runs into a version conflict. Valid options are `abort` and `proceed`. Default is abort.
60+
conflicts | Indicates to OpenSearch what should happen if the Reindex operation runs into a version conflict. Valid options are `abort` and `proceed`. Default is `abort`.
6161
source | Information about the source index to include. Valid fields are `index`, `max_docs`, `query`, `remote`, `size`, `slice`, and `_source`.
6262
index | The name of the source index to copy data from.
6363
max_docs | The maximum number of documents to reindex.

_api-reference/index-apis/flush.md

+78
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
---
2+
layout: default
3+
title: Flush
4+
parent: Index APIs
5+
nav_order: 36
6+
---
7+
8+
# Flush
9+
10+
**Introduced 1.0**
11+
{: .label .label-purple }
12+
13+
The Flush API stores all in-memory operations to segments on disk. Operations flushed to an index segment are no longer needed in transaction logs during a cluster restart because these operations are now stored in the Lucene index.
14+
15+
OpenSearch automatically performs flushes in the background based on conditions like transaction log size, which is controlled by the `index.translog.flush_threshold_size` setting. Use the Flush API sparingly, for example, for manual restarts or to free up memory.
16+
17+
## Path and HTTP methods
18+
19+
The Flush API supports the following paths:
20+
21+
```
22+
GET /_flush
23+
POST /_flush
24+
GET /{index}/_flush
25+
POST /{index}/_flush
26+
```
27+
28+
## Path parameters
29+
30+
The following table lists the available path parameters. All path parameters are optional.
31+
32+
| Parameter | Data type | Description |
33+
| :--- | :--- | :--- |
34+
| `<index>` | String | A comma-separated list of indexes, data streams, or index aliases to which the operation is applied. Supports wildcard expressions (`*`). Use `_all` or `*` to specify all indexes and data streams in a cluster. |
35+
36+
## Query parameters
37+
38+
The Flush API supports the following query parameters.
39+
40+
| Parameter | Data type | Description |
41+
| :--- | :--- | :--- |
42+
| `allow_no_indices` | Boolean | When `false`, the request returns an error if any wildcard expression or index alias targets any closed or missing indexes. Default is `true`. |
43+
| `expand_wildcards` | String | Specifies the types of indexes to which wildcard expressions can expand. Supports comma-separated values. Valid values are: <br> - `all`: Expand to all open and closed indexes, including hidden indexes. <br> - `open`: Expand to open indexes. <br> - `closed`: Expand to closed indexes. <br> - `hidden`: Include hidden indexes when expanding. Must be combined with `open`, `closed`, or both. <br> - `none`: Do not accept wildcard expressions. <br> Default is `open`. |
44+
| `force` | Boolean | When `true`, forces a flush to occur even when no changes to the index exist in-memory. Default is `true`. |
45+
| `ignore_unavailable` | Boolean | When `true`, OpenSearch ignores missing or closed indexes. If `false`, OpenSearch returns an error if the force merge operation encounters missing or closed indexes. Default is `false`. |
46+
| `wait_if_ongoing` | Boolean | When `true`, the Flush API does not run while another flush request is active. When `false`, OpenSearch returns an error if another flush request is active. Default is `true`. |
47+
48+
## Example request: Flush a specific index
49+
50+
The following example flushes an index named `shakespeare`:
51+
52+
```
53+
POST /shakespeare/_flush
54+
```
55+
56+
## Example request: Flush all indexes
57+
58+
The following example flushes all indexes in a cluster:
59+
60+
```
61+
POST /_flush
62+
```
63+
64+
## Example response
65+
66+
OpenSearch responds with the number of shards that acknowledged the flush request, the number of shards that completed the request, and the number of shards that failed:
67+
68+
```
69+
{
70+
"_shards": {
71+
"total": 10,
72+
"successful": 10,
73+
"failed": 0
74+
}
75+
}
76+
```
77+
78+

_api-reference/index-apis/get-settings.md

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ title: Get settings
44
parent: Index APIs
55
nav_order: 45
66
redirect_from:
7+
- /opensearch/rest-api/index-apis/get-settings/
78
- /opensearch/rest-api/index-apis/get-index/
89
---
910

_api-reference/index-apis/index.md

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ title: Index APIs
44
has_children: true
55
nav_order: 35
66
redirect_from:
7+
- /opensearch/rest-api/index-apis/index/
78
- /opensearch/rest-api/index-apis/
89
---
910

_api-reference/index-apis/put-mapping.md

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ title: Create or update mappings
44
parent: Index APIs
55
nav_order: 27
66
redirect_from:
7+
- /opensearch/rest-api/index-apis/put-mapping/
78
- /opensearch/rest-api/index-apis/update-mapping/
89
- /opensearch/rest-api/update-mapping/
910
---

0 commit comments

Comments
 (0)