Skip to content

Commit 3d03a81

Browse files
authored
Merge pull request #2 from kolchfa-aws/gh-workflow
Gh workflow
2 parents 33a42dd + 22afcb7 commit 3d03a81

File tree

66 files changed

+1138
-329
lines changed

Some content is hidden

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

66 files changed

+1138
-329
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ _List any issues this PR will resolve, e.g. Closes [...]._
77
### Version
88
_List the OpenSearch version to which this PR applies, e.g. 2.14, 2.12--2.14, or all._
99

10+
### Frontend features
11+
_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._
12+
1013
### Checklist
1114
- [ ] 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).
1215
For more information on following Developer Certificate of Origin and signing off your commits, please check [here](https://github.com/opensearch-project/OpenSearch/blob/main/CONTRIBUTING.md#developer-certificate-of-origin).

.github/workflows/pr-checklist.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: PR Checklist
2+
3+
on:
4+
pull_request:
5+
types: [opened]
6+
7+
jobs:
8+
add-checklist-and-assignees:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Comment PR with checklist
13+
uses: peter-evans/create-or-update-comment@v3
14+
with:
15+
token: ${{ secrets.GITHUB_TOKEN }}
16+
issue-number: ${{ github.event.pull_request.number }}
17+
body: |
18+
Thank you for submitting your PR. The PR states are Tech review -> Doc review -> Editorial review. If you're a developer submitting documentation for a feature you implemented, have the documentation reviewed by your team. If you need a tech review, let us know. Here's a checklist of the PR progression:
19+
20+
### PR Checklist
21+
- [x] Tech Review
22+
- [ ] Doc Review
23+
- [ ] Editorial Review
24+
25+
- name: Add assignees to the PR
26+
uses: peter-evans/create-or-update-comment@v3
27+
with:
28+
token: ${{ secrets.GITHUB_TOKEN }}
29+
issue-number: ${{ github.event.pull_request.number }}
30+
assignees: ${{ github.actor }}, kolchfa-aws

_about/version-history.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ permalink: /version-history/
99

1010
OpenSearch version | Release highlights | Release date
1111
:--- | :--- | :---
12+
[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
1213
[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
1314
[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
1415
[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

_api-reference/cat/index.md

Lines changed: 122 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,54 @@ GET _cat
2424
```
2525
{% include copy-curl.html %}
2626

27+
The response is an ASCII cat (`=^.^=`) and a list of operations:
28+
29+
```
30+
=^.^=
31+
/_cat/allocation
32+
/_cat/segment_replication
33+
/_cat/segment_replication/{index}
34+
/_cat/shards
35+
/_cat/shards/{index}
36+
/_cat/cluster_manager
37+
/_cat/nodes
38+
/_cat/tasks
39+
/_cat/indices
40+
/_cat/indices/{index}
41+
/_cat/segments
42+
/_cat/segments/{index}
43+
/_cat/count
44+
/_cat/count/{index}
45+
/_cat/recovery
46+
/_cat/recovery/{index}
47+
/_cat/health
48+
/_cat/pending_tasks
49+
/_cat/aliases
50+
/_cat/aliases/{alias}
51+
/_cat/thread_pool
52+
/_cat/thread_pool/{thread_pools}
53+
/_cat/plugins
54+
/_cat/fielddata
55+
/_cat/fielddata/{fields}
56+
/_cat/nodeattrs
57+
/_cat/repositories
58+
/_cat/snapshots/{repository}
59+
/_cat/templates
60+
/_cat/pit_segments
61+
/_cat/pit_segments/{pit_id}
62+
```
63+
2764
## Optional query parameters
2865

29-
You can use the following query parameters with any CAT API to filter your results.
66+
The root `_cat` API does not take any parameters, but individual APIs, such as `/_cat/nodes` accept the following query parameters.
3067

3168
Parameter | Description
3269
:--- | :--- |
3370
`v` | Provides verbose output by adding headers to the columns. It also adds some formatting to help align each of the columns together. All examples in this section include the `v` parameter.
3471
`help` | Lists the default and other available headers for a given operation.
3572
`h` | Limits the output to specific headers.
36-
`format` | Returns the result in JSON, YAML, or CBOR formats.
37-
`sort` | Sorts the output by the specified columns.
73+
`format` | The format in which to return the result. Valid values are `json`, `yaml`, `cbor`, and `smile`.
74+
`s` | Sorts the output by the specified columns.
3875

3976
### Query parameter usage examples
4077

@@ -59,7 +96,6 @@ sample-alias1 sample-index-1 - - - -
5996
Without the verbose parameter, `v`, the response simply returns the alias names:
6097

6198
```
62-
6399
.kibana .kibana_1 - - - -
64100
sample-alias1 sample-index-1 - - - -
65101
```
@@ -72,6 +108,24 @@ To see all the available headers, use the `help` parameter:
72108
GET _cat/<operation_name>?help
73109
```
74110

111+
For example, to see the available headers for the CAT aliases operation, send the following request:
112+
113+
```json
114+
GET _cat/aliases?help
115+
```
116+
{% include copy-curl.html %}
117+
118+
The response contains the available headers:
119+
120+
```
121+
alias | a | alias name
122+
index | i,idx | index alias points to
123+
filter | f,fi | filter
124+
routing.index | ri,routingIndex | index routing
125+
routing.search | rs,routingSearch | search routing
126+
is_write_index | w,isWriteIndex | write index
127+
```
128+
75129
### Get a subset of headers
76130

77131
To limit the output to a subset of headers, use the `h` parameter:
@@ -80,7 +134,71 @@ To limit the output to a subset of headers, use the `h` parameter:
80134
GET _cat/<operation_name>?h=<header_name_1>,<header_name_2>&v
81135
```
82136

137+
For example, to limit aliases to only the alias name and index, send the following request:
138+
139+
```json
140+
GET _cat/aliases?h=alias,index
141+
```
142+
{% include copy-curl.html %}
143+
144+
The response contains the requested information:
145+
146+
```
147+
.kibana .kibana_1
148+
sample-alias1 sample-index-1
149+
```
150+
83151
Typically, for any operation you can find out what headers are available using the `help` parameter, and then use the `h` parameter to limit the output to only the headers that you care about.
84152

153+
### Sort by a header
154+
155+
To sort the output by a header, use the `s` parameter:
156+
157+
```json
158+
GET _cat/<operation_name>?s=<header_name_1>,<header_name_2>
159+
```
160+
161+
For example, to sort aliases by alias and then index, send the following request:
162+
163+
```json
164+
GET _cat/aliases?s=i,a
165+
```
166+
{% include copy-curl.html %}
167+
168+
The response contains the requested information:
169+
170+
```
171+
sample-alias2 sample-index-1
172+
sample-alias1 sample-index-2
173+
```
174+
175+
### Retrieve data in JSON format
176+
177+
By default, CAT APIs return data in `text/plain` format.
178+
179+
To retrieve data in JSON format, use the `format=json` parameter:
180+
181+
```json
182+
GET _cat/<operation_name>?format=json
183+
```
184+
185+
For example, to retrieve aliases in JSON format, send the following request:
186+
187+
```json
188+
GET _cat/aliases?format=json
189+
```
190+
{% include copy-curl.html %}
191+
192+
The response contains data in JSON format:
193+
194+
```json
195+
[
196+
{"alias":".kibana","index":".kibana_1","filter":"-","routing.index":"-","routing.search":"-","is_write_index":"-"},
197+
{"alias":"sample-alias-1","index":"sample-index-1","filter":"-","routing.index":"-","routing.search":"-","is_write_index":"-"}
198+
]
199+
```
200+
201+
Other supported formats are [YAML](https://yaml.org/), [CBOR](https://cbor.io/), and [Smile](https://github.com/FasterXML/smile-format-specification).
202+
85203
If you use the Security plugin, make sure you have the appropriate permissions.
86204
{: .note }

_api-reference/common-parameters.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,3 +90,37 @@ The following request specifies filters to limit the fields returned in the resp
9090

9191
GET _search?filter_path=<field_name>.*,-<field_name>
9292
```
93+
94+
## Units
95+
96+
OpenSearch APIs support the following units.
97+
98+
### Time units
99+
100+
The following table lists all supported time units.
101+
102+
Units | Specify as
103+
:--- | :---
104+
Days | `d`
105+
Hours | `h`
106+
Minutes | `m`
107+
Seconds | `s`
108+
Milliseconds | `ms`
109+
Microseconds | `micros`
110+
Nanoseconds | `nanos`
111+
112+
### Distance units
113+
114+
The following table lists all supported distance units.
115+
116+
Units | Specify as
117+
:--- | :---
118+
Miles | `mi` or `miles`
119+
Yards | `yd` or `yards`
120+
Feet | `ft` or `feet`
121+
Inches | `in` or `inch`
122+
Kilometers | `km` or `kilometers`
123+
Meters | `m` or `meters`
124+
Centimeters | `cm` or `centimeters`
125+
Millimeters | `mm` or `millimeters`
126+
Nautical miles | `NM`, `nmi`, or `nauticalmiles`

_api-reference/document-apis/bulk.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,9 @@ All actions support the same metadata: `_index`, `_id`, and `_require_alias`. If
124124
{ "doc" : { "title": "World War Z" }, "doc_as_upsert": true }
125125
```
126126

127-
You can specify a script for more complex document updates:
127+
You can specify a script for more complex document updates by defining the script with the `source` or `id` from a document:
128+
129+
128130

129131
- Script
130132
```json

_api-reference/index-apis/refresh.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ The following table lists the available query parameters. All query parameters a
4545
| :--- | :--- | :--- |
4646
| `ignore_unavailable` | Boolean | When `false`, the request returns an error when it targets a missing or closed index. Default is `false`.
4747
| `allow_no_indices` | Boolean | When `false`, the Refresh Index API returns an error when a wildcard expression, index alias, or `_all` targets only closed or missing indexes, even when the request is made against open indexes. Default is `true`. |
48-
| `expand_wildcard` | String | The type of index that the wildcard patterns can match. If the request targets data streams, this argument determines whether the wildcard expressions match any hidden data streams. Supports comma-separated values, such as `open,hidden`. Valid values are `all`, `open`, `closed`, `hidden`, and `none`.
48+
| `expand_wildcards` | String | The type of index that the wildcard patterns can match. If the request targets data streams, this argument determines whether the wildcard expressions match any hidden data streams. Supports comma-separated values, such as `open,hidden`. Valid values are `all`, `open`, `closed`, `hidden`, and `none`.
4949

5050

5151

_api-reference/render-template.md

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
---
2+
layout: default
3+
title: Render Template
4+
nav_order: 82
5+
---
6+
7+
# Render Template
8+
9+
The Render Template API renders a [search template]({{site.url}}{{site.baseurl}}/search-plugins/search-template/) as a search query.
10+
11+
## Paths and HTTP methods
12+
13+
```
14+
GET /_render/template
15+
POST /_render/template
16+
GET /_render/template/<id>
17+
POST /_render/template/<id>
18+
```
19+
20+
## Path parameters
21+
22+
The Render Template API supports the following optional path parameter.
23+
24+
| Parameter | Type | Description |
25+
| :--- | :--- | :--- |
26+
| `id` | String | The ID of the search template to render. |
27+
28+
## Request options
29+
30+
The following options are supported in the request body of the Render Template API.
31+
32+
| Parameter | Required | Type | Description |
33+
| :--- | :--- | :--- | :--- |
34+
| `id` | Conditional | String | The ID of the search template to render. Is not required if the ID is provided in the path or if an inline template is specified by the `source`. |
35+
| `params` | No | Object | A list of key-value pairs that replace Mustache variables found in the search template. The key-value pairs must exist in the documents being searched. |
36+
| `source` | Conditional | Object | An inline search template to render if a search template is not specified. Supports the same parameters as a [Search]({{site.url}}{{site.baseurl}}/api-reference/search/) API request and [Mustache](https://mustache.github.io/mustache.5.html) variables. |
37+
38+
## Example request
39+
40+
Both of the following request examples use the search template with the template ID `play_search_template`:
41+
42+
```json
43+
{
44+
"source": {
45+
"query": {
46+
"match": {
47+
"play_name": "{{play_name}}"
48+
}
49+
}
50+
},
51+
"params": {
52+
"play_name": "Henry IV"
53+
}
54+
}
55+
```
56+
57+
### Render template using template ID
58+
59+
The following example request validates a search template with the ID `play_search_template`:
60+
61+
```json
62+
POST _render/template
63+
{
64+
"id": "play_search_template",
65+
"params": {
66+
"play_name": "Henry IV"
67+
}
68+
}
69+
```
70+
{% include copy.html %}
71+
72+
### Render template using `_source`
73+
74+
If you don't want to use a saved template, or want to test a template before saving, you can test a template with the `_source` parameter using [Mustache](https://mustache.github.io/mustache.5.html) variables, as shown in the following example:
75+
76+
```
77+
{
78+
"source": {
79+
"from": "{{from}}{{^from}}10{{/from}}",
80+
"size": "{{size}}{{^size}}10{{/size}}",
81+
"query": {
82+
"match": {
83+
"play_name": "{{play_name}}"
84+
}
85+
}
86+
},
87+
"params": {
88+
"play_name": "Henry IV"
89+
}
90+
}
91+
```
92+
{% include copy.html %}
93+
94+
## Example response
95+
96+
OpenSearch responds with information about the template's output:
97+
98+
```json
99+
{
100+
"template_output": {
101+
"from": "0",
102+
"size": "10",
103+
"query": {
104+
"match": {
105+
"play_name": "Henry IV"
106+
}
107+
}
108+
}
109+
}
110+
```
111+
112+
113+
114+

0 commit comments

Comments
 (0)