Skip to content

Commit

Permalink
Merge branch 'main' into mapping-content-gap
Browse files Browse the repository at this point in the history
  • Loading branch information
vagimeli authored Jun 26, 2024
2 parents a5ccbd9 + 9696bc1 commit d5a6655
Show file tree
Hide file tree
Showing 237 changed files with 11,613 additions and 844 deletions.
5 changes: 3 additions & 2 deletions .github/ISSUE_TEMPLATE/issue_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ assignees: ''
- [ ] Report a technical problem with the documentation
- [ ] Other

**Tell us about your request.** Provide a summary of the request and all versions that are affected.

**Tell us about your request.** Provide a summary of the request.

***Version:** List the OpenSearch version to which this issue applies, e.g. 2.14, 2.12--2.14, or all.

**What other resources are available?** Provide links to related issues, POCs, steps for testing, etc.

5 changes: 5 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ _Describe what this change achieves._
### Issues Resolved
_List any issues this PR will resolve, e.g. Closes [...]._

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

### Frontend features
_If you're submitting documentation for an OpenSearch Dashboards feature, add a video that shows how a user will interact with the UI step by step. A voiceover is optional._

### Checklist
- [ ] 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).
Expand Down
2 changes: 2 additions & 0 deletions .github/vale/styles/OpenSearch/DashSpacing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,7 @@ message: "There should be no spaces around the dash in '%s'."
ignorecase: true
nonword: true
level: error
scope:
- ~list
tokens:
- '\w+ +-{2,3} +\w+'
1 change: 1 addition & 0 deletions .github/vale/styles/Vocab/OpenSearch/Products/accept.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Amazon SageMaker
Ansible
Auditbeat
AWS Cloud
Cohere Command
Cognito
Dashboards Query Language
Data Prepper
Expand Down
4 changes: 4 additions & 0 deletions .github/vale/tests/test-style-neg.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ This sentence tests cybersecurity.

This sentence tests dash---spacing.

This sentence tests:

- Dash --- spacing in a list.

This sentence tests numbers above 1.2 in versions 1.2 and earlier.

This sentence tests upper-right and lower left.
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ Follow these steps to set up your local copy of the repository:

```
curl -sSL https://get.rvm.io | bash -s stable
rvm install 3.2
rvm install 3.2.4
ruby -v
```

Expand Down
80 changes: 41 additions & 39 deletions STYLE_GUIDE.md

Large diffs are not rendered by default.

76 changes: 38 additions & 38 deletions TERMS.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion _about/breaking-changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ In OpenSearch 2.0, the Alerting plugin is now integrated with new plugins for No

### Drop support for JDK 8

A Lucene upgrade forced OpenSearch to drop support for JDK 8. As a consequence, the [Java high-level REST client]({{site.url}}{{site.baseurl}}/clients/java-rest-high-level/) no longer supports JDK 8. Restoring JDK 8 support is currently an `opensearch-java` proposal [#156](https://github.com/opensearch-project/opensearch-java/issues/156) and will require removing OpenSearch core as a dependency from the Java client (issue [#262](https://github.com/opensearch-project/opensearch-java/issues/262)).
A Lucene upgrade forced OpenSearch to drop support for JDK 8. As a consequence, the Java high-level REST client no longer supports JDK 8. Restoring JDK 8 support is currently an `opensearch-java` proposal [#156](https://github.com/opensearch-project/opensearch-java/issues/156) and will require removing OpenSearch core as a dependency from the Java client (issue [#262](https://github.com/opensearch-project/opensearch-java/issues/262)).


## 2.5.0
Expand Down
2 changes: 2 additions & 0 deletions _about/version-history.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ permalink: /version-history/

OpenSearch version | Release highlights | Release date
:--- | :--- | :---
[2.15.0](https://github.com/opensearch-project/opensearch-build/blob/main/release-notes/opensearch-release-notes-2.15.0.md) | Includes parallel ingestion processing, SIMD support for exact search, and the ability to disable doc values for the k-NN field. Adds wildcard and derived field types. Improves performance for single-cardinality aggregations, rolling upgrades to remote-backed clusters, and more metrics for top N queries. For a full list of release highlights, see the Release Notes. | 25 June 2024
[2.14.0](https://github.com/opensearch-project/opensearch-build/blob/main/release-notes/opensearch-release-notes-2.14.0.md) | Includes performance improvements to hybrid search and date histogram queries with multi-range traversal, ML model integration within the Ingest API, semantic cache for LangChain applications, low-level vector query interface for neural sparse queries, and improved k-NN search filtering. Provides an experimental tiered cache feature. For a full list of release highlights, see the Release Notes. | 14 May 2024
[2.13.0](https://github.com/opensearch-project/opensearch-build/blob/main/release-notes/opensearch-release-notes-2.13.0.md) | Makes agents and tools and the OpenSearch Assistant Toolkit generally available. Introduces vector quantization within OpenSearch. Adds LLM guardrails and hybrid search with aggregations. Adds the Bloom filter skipping index for Apache Spark data sources, I/O-based admission control, and the ability to add an alerting cluster that manages all alerting tasks. For a full list of release highlights, see the Release Notes. | 2 April 2024
[2.12.0](https://github.com/opensearch-project/opensearch-build/blob/main/release-notes/opensearch-release-notes-2.12.0.md) | Makes concurrent segment search and conversational search generally available. Provides an experimental OpenSearch Assistant Toolkit, including agents and tools, workflow automation, and OpenSearch Assistant for OpenSearch Dashboards UI. Adds a new match-only text field, query insights to monitor top N queries, and k-NN search on nested fields. For a full list of release highlights, see the Release Notes. | 20 February 2024
Expand All @@ -29,6 +30,7 @@ OpenSearch version | Release highlights | Release date
[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
[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
[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
[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
[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
[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
[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
Expand Down
2 changes: 2 additions & 0 deletions _aggregations/bucket/geohex-grid.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ parent: Bucket aggregations
grand_parent: Aggregations
nav_order: 85
redirect_from:
- /opensearch/geohexgrid-agg/
- /query-dsl/aggregations/geohexgrid-agg/
- /aggregations/geohexgrid/
- /query-dsl/aggregations/geohexgrid/
- /query-dsl/aggregations/bucket/geohex-grid/
Expand Down
1 change: 1 addition & 0 deletions _aggregations/bucket/multi-terms.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ parent: Bucket aggregations
grand_parent: Aggregations
nav_order: 130
redirect_from:
- /query-dsl/aggregations/bucket/multi-terms/
- /query-dsl/aggregations/multi-terms/
---

Expand Down
1 change: 1 addition & 0 deletions _aggregations/bucket/range.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ parent: Bucket aggregations
grand_parent: Aggregations
nav_order: 150
redirect_from:
- /query-dsl/aggregations/bucket/date-range/
- /query-dsl/aggregations/bucket/range/
---

Expand Down
2 changes: 2 additions & 0 deletions _aggregations/bucket/sampler.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ title: Sampler
parent: Bucket aggregations
grand_parent: Aggregations
nav_order: 170
redirect_from:
- /query-dsl/aggregations/bucket/diversified-sampler/
---

# Sampler aggregations
Expand Down
2 changes: 2 additions & 0 deletions _aggregations/bucket/significant-terms.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ title: Significant terms
parent: Bucket aggregations
grand_parent: Aggregations
nav_order: 180
redirect_from:
- /query-dsl/aggregations/bucket/significant-terms/
---

# Significant terms aggregations
Expand Down
2 changes: 2 additions & 0 deletions _aggregations/bucket/significant-text.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ title: Significant text
parent: Bucket aggregations
grand_parent: Aggregations
nav_order: 190
redirect_from:
- /query-dsl/aggregations/bucket/significant-text/
---

# Significant text aggregations
Expand Down
2 changes: 2 additions & 0 deletions _aggregations/bucket/terms.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ title: Terms
parent: Bucket aggregations
grand_parent: Aggregations
nav_order: 200
redirect_from:
- /query-dsl/aggregations/bucket/terms/
---

# Terms aggregations
Expand Down
1 change: 1 addition & 0 deletions _aggregations/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ nav_order: 5
nav_exclude: true
permalink: /aggregations/
redirect_from:
- /query-dsl/aggregations/aggregations/
- /opensearch/aggregations/
- /query-dsl/aggregations/
- /aggregations/index/
Expand Down
158 changes: 158 additions & 0 deletions _aggregations/metric/median-absolute-deviation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
---
layout: default
title: Median absolute deviation
parent: Metric aggregations
grand_parent: Aggregations
nav_order: 65
redirect_from:
- /query-dsl/aggregations/metric/median-absolute-deviation/
---

# Median absolute deviation aggregations

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.

Median absolute deviation is calculated as follows:<br>
median_absolute_deviation = median(|X<sub>i</sub> - Median(X<sub>i</sub>)|)

The following example calculates the median absolute deviation of the `DistanceMiles` field in the sample dataset `opensearch_dashboards_sample_data_flights`:


```json
GET opensearch_dashboards_sample_data_flights/_search
{
"size": 0,
"aggs": {
"median_absolute_deviation_DistanceMiles": {
"median_absolute_deviation": {
"field": "DistanceMiles"
}
}
}
}
```
{% include copy-curl.html %}

#### Example response

```json
{
"took": 35,
"timed_out": false,
"_shards": {
"total": 1,
"successful": 1,
"skipped": 0,
"failed": 0
},
"hits": {
"total": {
"value": 10000,
"relation": "gte"
},
"max_score": null,
"hits": []
},
"aggregations": {
"median_absolute_deviation_distanceMiles": {
"value": 1829.8993624441966
}
}
}
```

### Missing

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:

```json
GET opensearch_dashboards_sample_data_flights/_search
{
"size": 0,
"aggs": {
"median_absolute_deviation_distanceMiles": {
"median_absolute_deviation": {
"field": "DistanceMiles",
"missing": 1000
}
}
}
}
```
{% include copy-curl.html %}

#### Example response

```json
{
"took": 7,
"timed_out": false,
"_shards": {
"total": 1,
"successful": 1,
"skipped": 0,
"failed": 0
},
"hits": {
"total": {
"value": 10000,
"relation": "gte"
},
"max_score": null,
"hits": []
},
"aggregations": {
"median_absolute_deviation_distanceMiles": {
"value": 1829.6443646143355
}
}
}
```

### Compression

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:

```json
GET opensearch_dashboards_sample_data_flights/_search
{
"size": 0,
"aggs": {
"median_absolute_deviation_DistanceMiles": {
"median_absolute_deviation": {
"field": "DistanceMiles",
"compression": 10
}
}
}
}
```
{% include copy-curl.html %}

#### Example response

```json
{
"took": 1,
"timed_out": false,
"_shards": {
"total": 1,
"successful": 1,
"skipped": 0,
"failed": 0
},
"hits": {
"total": {
"value": 10000,
"relation": "gte"
},
"max_score": null,
"hits": []
},
"aggregations": {
"median_absolute_deviation_DistanceMiles": {
"value": 1836.265614211182
}
}
}
```
1 change: 1 addition & 0 deletions _api-reference/analyze-apis.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ title: Analyze API
has_children: true
nav_order: 7
redirect_from:
- /api-reference/analyze-apis/perform-text-analysis/
- /opensearch/rest-api/analyze-apis/
- /api-reference/analyze-apis/
---
Expand Down
5 changes: 4 additions & 1 deletion _api-reference/document-apis/bulk.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ routing | String | Routes the request to the specified shard.
timeout | Time | How long to wait for the request to return. Default `1m`.
type | String | (Deprecated) The default document type for documents that don't specify a type. Default is `_doc`. We highly recommend ignoring this parameter and using a type of `_doc` for all indexes.
wait_for_active_shards | String | Specifies the number of active shards that must be available before OpenSearch processes the bulk request. Default is 1 (only the primary shard). Set to `all` or a positive integer. Values greater than 1 require replicas. For example, if you specify a value of 3, the index must have two replicas distributed across two additional nodes for the request to succeed.
batch_size | Integer | Specifies the number of documents to be batched and sent to an ingest pipeline to be processed together. Default is `1` (documents are ingested by an ingest pipeline one at a time). If the bulk request doesn't explicitly specify an ingest pipeline or the index doesn't have a default ingest pipeline, then this parameter is ignored. Only documents with `create`, `index`, or `update` actions can be grouped into batches.
{% comment %}_source | List | asdf
_source_excludes | list | asdf
_source_includes | list | asdf{% endcomment %}
Expand Down Expand Up @@ -123,7 +124,9 @@ All actions support the same metadata: `_index`, `_id`, and `_require_alias`. If
{ "doc" : { "title": "World War Z" }, "doc_as_upsert": true }
```

You can specify a script for more complex document updates:
You can specify a script for more complex document updates by defining the script with the `source` or `id` from a document:



- Script
```json
Expand Down
2 changes: 1 addition & 1 deletion _api-reference/document-apis/reindex.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Your request body must contain the names of the source index and destination ind

Field | Description
:--- | :---
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.
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`.
source | Information about the source index to include. Valid fields are `index`, `max_docs`, `query`, `remote`, `size`, `slice`, and `_source`.
index | The name of the source index to copy data from.
max_docs | The maximum number of documents to reindex.
Expand Down
Loading

0 comments on commit d5a6655

Please sign in to comment.