Skip to content

Commit

Permalink
Merge branch 'main' into fix/top_hits_fetch_phase_lookup
Browse files Browse the repository at this point in the history
  • Loading branch information
javanna committed Apr 2, 2024
2 parents aa9a371 + 646ac4f commit 3c6a71d
Show file tree
Hide file tree
Showing 166 changed files with 6,225 additions and 1,263 deletions.
2 changes: 1 addition & 1 deletion .buildkite/pipelines/intake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ steps:
timeout_in_minutes: 300
matrix:
setup:
BWC_VERSION: ["7.17.20", "8.13.1", "8.14.0"]
BWC_VERSION: ["7.17.20", "8.13.2", "8.14.0"]
agents:
provider: gcp
image: family/elasticsearch-ubuntu-2004
Expand Down
6 changes: 3 additions & 3 deletions .buildkite/pipelines/periodic-packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -529,8 +529,8 @@ steps:
env:
BWC_VERSION: 8.12.2

- label: "{{matrix.image}} / 8.13.1 / packaging-tests-upgrade"
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v8.13.1
- label: "{{matrix.image}} / 8.13.2 / packaging-tests-upgrade"
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v8.13.2
timeout_in_minutes: 300
matrix:
setup:
Expand All @@ -543,7 +543,7 @@ steps:
machineType: custom-16-32768
buildDirectory: /dev/shm/bk
env:
BWC_VERSION: 8.13.1
BWC_VERSION: 8.13.2

- label: "{{matrix.image}} / 8.14.0 / packaging-tests-upgrade"
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v8.14.0
Expand Down
10 changes: 5 additions & 5 deletions .buildkite/pipelines/periodic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -312,16 +312,16 @@ steps:
buildDirectory: /dev/shm/bk
env:
BWC_VERSION: 8.12.2
- label: 8.13.1 / bwc
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v8.13.1#bwcTest
- label: 8.13.2 / bwc
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v8.13.2#bwcTest
timeout_in_minutes: 300
agents:
provider: gcp
image: family/elasticsearch-ubuntu-2004
machineType: n1-standard-32
buildDirectory: /dev/shm/bk
env:
BWC_VERSION: 8.13.1
BWC_VERSION: 8.13.2
- label: 8.14.0 / bwc
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v8.14.0#bwcTest
timeout_in_minutes: 300
Expand Down Expand Up @@ -396,7 +396,7 @@ steps:
setup:
ES_RUNTIME_JAVA:
- openjdk17
BWC_VERSION: ["7.17.20", "8.13.1", "8.14.0"]
BWC_VERSION: ["7.17.20", "8.13.2", "8.14.0"]
agents:
provider: gcp
image: family/elasticsearch-ubuntu-2004
Expand Down Expand Up @@ -438,7 +438,7 @@ steps:
- graalvm-ce17
- openjdk17
- openjdk21
BWC_VERSION: ["7.17.20", "8.13.1", "8.14.0"]
BWC_VERSION: ["7.17.20", "8.13.2", "8.14.0"]
agents:
provider: gcp
image: family/elasticsearch-ubuntu-2004
Expand Down
2 changes: 1 addition & 1 deletion .ci/bwcVersions
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@ BWC_VERSION:
- "8.10.4"
- "8.11.4"
- "8.12.2"
- "8.13.1"
- "8.13.2"
- "8.14.0"
2 changes: 1 addition & 1 deletion .ci/snapshotBwcVersions
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
BWC_VERSION:
- "7.17.20"
- "8.13.1"
- "8.13.2"
- "8.14.0"
5 changes: 5 additions & 0 deletions docs/changelog/106503.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pr: 106503
summary: "Support ST_CONTAINS and ST_WITHIN"
area: "ES|QL"
type: enhancement
issues: []
5 changes: 0 additions & 5 deletions docs/changelog/106564.yaml

This file was deleted.

5 changes: 0 additions & 5 deletions docs/changelog/106602.yaml

This file was deleted.

5 changes: 0 additions & 5 deletions docs/changelog/106655.yaml

This file was deleted.

6 changes: 0 additions & 6 deletions docs/changelog/106678.yaml

This file was deleted.

7 changes: 0 additions & 7 deletions docs/changelog/106793.yaml

This file was deleted.

5 changes: 0 additions & 5 deletions docs/changelog/106799.yaml

This file was deleted.

5 changes: 0 additions & 5 deletions docs/changelog/106878.yaml

This file was deleted.

10 changes: 7 additions & 3 deletions docs/reference/cluster/delete-desired-balance.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,13 @@

NOTE: {cloud-only}

Resets the desired balance and starts a new computation from the current allocation.
This API may be used if desired balance computation diverged from the current state
and is trying to move too many shards.
Discards the current desired balance and computes a new desired balance starting from the current allocation of shards.
This can sometimes help {es} find a desired balance which needs fewer shard movements to achieve, especially if the
cluster has experienced changes so substantial that the current desired balance is no longer optimal without {es} having
detected that the current desired balance will take more shard movements to achieve than needed. However, this API
imposes a heavy load on the elected master node and may not always have the expected effect. Calling this API should
never be necessary. Consider instead <<shards-rebalancing-heuristics,increasing the value of
`cluster.routing.allocation.balance.threshold`>> to avoid excessive shard movements.

[[delete-desired-balance-request]]
==== {api-request-title}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ The <<esql-stats-by>> function supports these aggregate functions:
* <<esql-agg-median-absolute-deviation>>
* <<esql-agg-min>>
* <<esql-agg-percentile>>
* <<esql-agg-st-centroid>>
* experimental:[] <<esql-agg-st-centroid>>
* <<esql-agg-sum>>
* <<esql-agg-values>>
// end::agg_list[]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.

*Description*

Returns whether the first geometry contains the second geometry.

NOTE: The second parameter must also have the same coordinate system as the first. This means it is not possible to combine `geo_*` and `cartesian_*` parameters.
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
*Description*

Returns whether the two geometries or geometry columns intersect.

NOTE: The second parameter must also have the same coordinate system as the first. This means it is not possible to combine `geo_*` and `cartesian_*` parameters.
7 changes: 7 additions & 0 deletions docs/reference/esql/functions/description/st_within.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.

*Description*

Returns whether the first geometry is within the second geometry.

NOTE: The second parameter must also have the same coordinate system as the first. This means it is not possible to combine `geo_*` and `cartesian_*` parameters.
13 changes: 13 additions & 0 deletions docs/reference/esql/functions/examples/st_contains.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.

*Example*

[source.merge.styled,esql]
----
include::{esql-specs}/spatial_shapes.csv-spec[tag=st_contains-airport_city_boundaries]
----
[%header.monospaced.styled,format=dsv,separator=|]
|===
include::{esql-specs}/spatial_shapes.csv-spec[tag=st_contains-airport_city_boundaries-result]
|===

13 changes: 13 additions & 0 deletions docs/reference/esql/functions/examples/st_intersects.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.

*Example*

[source.merge.styled,esql]
----
include::{esql-specs}/spatial.csv-spec[tag=st_intersects-airports]
----
[%header.monospaced.styled,format=dsv,separator=|]
|===
include::{esql-specs}/spatial.csv-spec[tag=st_intersects-airports-result]
|===

13 changes: 13 additions & 0 deletions docs/reference/esql/functions/examples/st_within.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.

*Example*

[source.merge.styled,esql]
----
include::{esql-specs}/spatial_shapes.csv-spec[tag=st_within-airport_city_boundaries]
----
[%header.monospaced.styled,format=dsv,separator=|]
|===
include::{esql-specs}/spatial_shapes.csv-spec[tag=st_within-airport_city_boundaries-result]
|===

15 changes: 15 additions & 0 deletions docs/reference/esql/functions/layout/st_contains.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.

[discrete]
[[esql-st_contains]]
=== `ST_CONTAINS`

*Syntax*

[.text-center]
image::esql/functions/signature/st_contains.svg[Embedded,opts=inline]

include::../parameters/st_contains.asciidoc[]
include::../description/st_contains.asciidoc[]
include::../types/st_contains.asciidoc[]
include::../examples/st_contains.asciidoc[]
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ image::esql/functions/signature/st_intersects.svg[Embedded,opts=inline]
include::../parameters/st_intersects.asciidoc[]
include::../description/st_intersects.asciidoc[]
include::../types/st_intersects.asciidoc[]
include::../examples/st_intersects.asciidoc[]
15 changes: 15 additions & 0 deletions docs/reference/esql/functions/layout/st_within.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.

[discrete]
[[esql-st_within]]
=== `ST_WITHIN`

*Syntax*

[.text-center]
image::esql/functions/signature/st_within.svg[Embedded,opts=inline]

include::../parameters/st_within.asciidoc[]
include::../description/st_within.asciidoc[]
include::../types/st_within.asciidoc[]
include::../examples/st_within.asciidoc[]
7 changes: 7 additions & 0 deletions docs/reference/esql/functions/parameters/st_contains.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
*Parameters*

`geomA`::
Geometry column name or variable of geometry type

`geomB`::
Geometry column name or variable of geometry type
7 changes: 7 additions & 0 deletions docs/reference/esql/functions/parameters/st_within.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
*Parameters*

`geomA`::
Geometry column name or variable of geometry type

`geomB`::
Geometry column name or variable of geometry type
1 change: 1 addition & 0 deletions docs/reference/esql/functions/signature/st_contains.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/reference/esql/functions/signature/st_within.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 7 additions & 3 deletions docs/reference/esql/functions/spatial-functions.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,15 @@
{esql} supports these spatial functions:

// tag::spatial_list[]
* <<esql-st_intersects>>
* <<esql-st_x>>
* <<esql-st_y>>
* experimental:[] <<esql-st_intersects>>
* experimental:[] <<esql-st_contains>>
* experimental:[] <<esql-st_within>>
* experimental:[] <<esql-st_x>>
* experimental:[] <<esql-st_y>>
// end::spatial_list[]

include::st_intersects.asciidoc[]
include::st_contains.asciidoc[]
include::st_within.asciidoc[]
include::st_x.asciidoc[]
include::st_y.asciidoc[]
2 changes: 2 additions & 0 deletions docs/reference/esql/functions/st_centroid.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
[[esql-agg-st-centroid]]
=== `ST_CENTROID`

experimental::[]

Calculate the spatial centroid over a field with spatial point geometry type.

[source.merge.styled,esql]
Expand Down
26 changes: 26 additions & 0 deletions docs/reference/esql/functions/st_contains.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
[discrete]
[[esql-st_contains]]
=== `ST_CONTAINS`

experimental::[]

*Syntax*

[.text-center]
image::esql/functions/signature/st_contains.svg[Embedded,opts=inline]

*Parameters*

`geomA`::
Expression of type `geo_point`, `cartesian_point`, `geo_shape` or `cartesian_shape`. If `null`, the function returns `null`.

`geomB`::
Expression of type `geo_point`, `cartesian_point`, `geo_shape` or `cartesian_shape`. If `null`, the function returns `null`.
The second parameter must also have the same coordinate system as the first.
This means it is not possible to combine `geo_*` and `cartesian_*` parameters.

include::description/st_contains.asciidoc[]
This is the inverse of the `<<esql-st_within,ST_WITHIN>>` function.

include::types/st_contains.asciidoc[]
include::examples/st_contains.asciidoc[]
16 changes: 3 additions & 13 deletions docs/reference/esql/functions/st_intersects.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
[[esql-st_intersects]]
=== `ST_INTERSECTS`

experimental::[]

*Syntax*

[.text-center]
Expand All @@ -24,17 +26,5 @@ They intersect if they have any point in common, including their interior points
(points along lines or within polygons).
In mathematical terms: ST_Intersects(A, B) ⇔ A ⋂ B ≠ ∅

*Supported types*

include::types/st_intersects.asciidoc[]

*Example*

[source.merge.styled,esql]
----
include::{esql-specs}/spatial.csv-spec[tag=st_intersects-airports]
----
[%header.monospaced.styled,format=dsv,separator=|]
|===
include::{esql-specs}/spatial.csv-spec[tag=st_intersects-airports-results]
|===
include::examples/st_intersects.asciidoc[]
26 changes: 26 additions & 0 deletions docs/reference/esql/functions/st_within.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
[discrete]
[[esql-st_within]]
=== `ST_WITHIN`

experimental::[]

*Syntax*

[.text-center]
image::esql/functions/signature/st_within.svg[Embedded,opts=inline]

*Parameters*

`geomA`::
Expression of type `geo_point`, `cartesian_point`, `geo_shape` or `cartesian_shape`. If `null`, the function returns `null`.

`geomB`::
Expression of type `geo_point`, `cartesian_point`, `geo_shape` or `cartesian_shape`. If `null`, the function returns `null`.
The second parameter must also have the same coordinate system as the first.
This means it is not possible to combine `geo_*` and `cartesian_*` parameters.

include::description/st_within.asciidoc[]
This is the inverse of the `<<esql-st_contains,ST_CONTAINS>>` function.

include::types/st_within.asciidoc[]
include::examples/st_within.asciidoc[]
2 changes: 2 additions & 0 deletions docs/reference/esql/functions/st_x.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
[[esql-st_x]]
=== `ST_X`

experimental::[]

*Syntax*

[.text-center]
Expand Down
Loading

0 comments on commit 3c6a71d

Please sign in to comment.