Skip to content

Commit

Permalink
Merge main into multi-project
Browse files Browse the repository at this point in the history
  • Loading branch information
albertzaharovits committed Sep 26, 2024
2 parents 9753a73 + 55ef5e6 commit 71ccf20
Show file tree
Hide file tree
Showing 225 changed files with 5,957 additions and 2,673 deletions.
2 changes: 1 addition & 1 deletion .ci/scripts/packaging-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ if [ -f "/etc/os-release" ] ; then
# Work around incorrect lintian version
# https://github.com/elastic/elasticsearch/issues/48573
if [ $VERSION_ID == 10 ] ; then
sudo apt-get update -y
sudo apt-get update -y || true
sudo apt-get install -y --allow-downgrades lintian=2.15.0
fi
fi
Expand Down
5 changes: 5 additions & 0 deletions docs/changelog/111684.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pr: 111684
summary: Write downloaded model parts async
area: Machine Learning
type: enhancement
issues: []
6 changes: 6 additions & 0 deletions docs/changelog/112723.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
pr: 112723
summary: Improve DateTime error handling and add some bad date tests
area: Search
type: bug
issues:
- 112190
5 changes: 5 additions & 0 deletions docs/changelog/113276.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pr: 113276
summary: Adding component template substitutions to the simulate ingest API
area: Ingest Node
type: enhancement
issues: []
10 changes: 10 additions & 0 deletions docs/changelog/113286.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
pr: 113286
summary: Deprecate legacy params from range query
area: Search
type: deprecation
issues: []
deprecation:
title: Deprecate legacy params from range query
area: REST API
details: Range query will not longer accept `to`, `from`, `include_lower`, and `include_upper` parameters.
impact: Instead use `gt`, `gte`, `lt` and `lte` parameters.
6 changes: 6 additions & 0 deletions docs/changelog/113499.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
pr: 113499
summary: Fix synthetic source for flattened field when used with `ignore_above`
area: Logs
type: bug
issues:
- 112044
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ Example:
POST /sales/_search?size=0
{
"query": {
"constant_score": { "filter": { "range": { "price": { "to": "500" } } } }
"constant_score": { "filter": { "range": { "price": { "lte": "500" } } } }
},
"aggs": {
"prices": {
Expand Down Expand Up @@ -202,7 +202,7 @@ Example:
POST /sales/_search?size=0
{
"query": {
"constant_score": { "filter": { "range": { "price": { "to": "500" } } } }
"constant_score": { "filter": { "range": { "price": { "lte": "500" } } } }
},
"aggs": {
"prices": {
Expand Down
4 changes: 2 additions & 2 deletions docs/reference/index.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ include::links.asciidoc[]

include::landing-page.asciidoc[]

include::intro.asciidoc[]

include::release-notes/highlights.asciidoc[]

include::intro.asciidoc[]

include::quickstart/index.asciidoc[]

include::setup.asciidoc[]
Expand Down
1 change: 1 addition & 0 deletions docs/reference/indices/index-templates.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ following index patterns:
- `metrics-*-*`
- `synthetics-*-*`
- `profiling-*`
- `security_solution-*-*`
// end::built-in-index-template-patterns[]
{fleet-guide}/fleet-overview.html[{agent}] uses these templates to create
Expand Down
7 changes: 5 additions & 2 deletions docs/reference/indices/put-component-template.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -129,14 +129,16 @@ include::{es-ref-dir}/rest-api/common-parms.asciidoc[tag=master-timeout]
[[put-component-template-api-request-body]]
==== {api-request-body-title}

// tag::template[]

`template`::
(Required, object)
This is the template to be applied, may optionally include a `mappings`,
`settings`, or `aliases` configuration.
+
.Properties of `template`
[%collapsible%open]
====
=====
`aliases`::
(Optional, object of objects) Aliases to add.
+
Expand All @@ -147,7 +149,7 @@ include::{es-ref-dir}/indices/create-index.asciidoc[tag=aliases-props]
include::{es-ref-dir}/rest-api/common-parms.asciidoc[tag=mappings]
include::{es-ref-dir}/rest-api/common-parms.asciidoc[tag=settings]
====
=====

`version`::
(Optional, integer)
Expand All @@ -174,6 +176,7 @@ This map is not automatically generated by {es}.
Marks this component template as deprecated.
When a deprecated component template is referenced when creating or updating a non-deprecated index template,
{es} will emit a deprecation warning.
end::template[]

[[put-component-template-api-example]]
==== {api-examples-title}
Expand Down
117 changes: 116 additions & 1 deletion docs/reference/ingest/apis/simulate-ingest.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,32 @@ POST /_ingest/_simulate
}
]
}
},
"component_template_substitutions": { <2>
"my-component-template": {
"template": {
"mappings": {
"dynamic": "true",
"properties": {
"field3": {
"type": "keyword"
}
}
},
"settings": {
"index": {
"default_pipeline": "my-pipeline"
}
}
}
}
}
}
----

<1> This replaces the existing `my-pipeline` pipeline with the contents given here for the duration of this request.
<2> This replaces the existing `my-component-template` component template with the contents given here for the duration of this request.
These templates can be used to change the pipeline(s) used, or to modify the mapping that will be used to validate the result.

[[simulate-ingest-api-request]]
==== {api-request-title}
Expand Down Expand Up @@ -191,6 +212,19 @@ Map of pipeline IDs to substitute pipeline definition objects.
include::put-pipeline.asciidoc[tag=pipeline-object]
====

`component_template_substitutions`::
(Optional, map of strings to objects)
Map of component template names to substitute component template definition objects.
+
.Properties of component template definition objects
[%collapsible%open]

====
include::{es-ref-dir}/indices/put-component-template.asciidoc[tag=template]
====

[[simulate-ingest-api-example]]
==== {api-examples-title}

Expand Down Expand Up @@ -268,7 +302,7 @@ The API returns the following response:

[[simulate-ingest-api-request-body-ex]]
===== Specify a pipeline substitution in the request body
In this example the index `index` has a default pipeline called `my-pipeline` and a final
In this example the index `my-index` has a default pipeline called `my-pipeline` and a final
pipeline called `my-final-pipeline`. But a substitute definition of `my-pipeline` is
provided in `pipeline_substitutions`. The substitute `my-pipeline` will be used in place of
the `my-pipeline` that is in the system, and then the `my-final-pipeline` that is already
Expand Down Expand Up @@ -348,6 +382,87 @@ The API returns the following response:
}
----

[[simulate-ingest-api-substitute-component-templates-ex]]
===== Specify a component template substitution in the request body
In this example, imagine that the index `my-index` has a strict mapping with only the `foo`
keyword field defined. Say that field mapping came from a component template named
`my-mappings-template`. We want to test adding a new field, `bar`. So a substitute definition of
`my-mappings-template` is provided in `component_template_substitutions`. The substitute
`my-mappings-template` will be used in place of the existing mapping for `my-index` and in place
of the `my-mappings-template` that is in the system.

[source,console]
----
POST /_ingest/_simulate
{
"docs": [
{
"_index": "my-index",
"_id": "123",
"_source": {
"foo": "foo"
}
},
{
"_index": "my-index",
"_id": "456",
"_source": {
"bar": "rab"
}
}
],
"component_template_substitutions": {
"my-mappings_template": {
"template": {
"mappings": {
"dynamic": "strict",
"properties": {
"foo": {
"type": "keyword"
},
"bar": {
"type": "keyword"
}
}
}
}
}
}
}
----

The API returns the following response:

[source,console-result]
----
{
"docs": [
{
"doc": {
"_id": "123",
"_index": "my-index",
"_version": -3,
"_source": {
"foo": "foo"
},
"executed_pipelines": []
}
},
{
"doc": {
"_id": "456",
"_index": "my-index",
"_version": -3,
"_source": {
"bar": "rab"
},
"executed_pipelines": []
}
}
]
}
----

////
[source,console]
----
Expand Down
Loading

0 comments on commit 71ccf20

Please sign in to comment.