elasticsearch/docs/reference/esql
Craig Taverner 2380492fac
ESQL: Support ST_CONTAINS and ST_WITHIN (#106503)
* WIP Started adding ST_CONTAINS

* Add generated evaluators

* Reduced warnings and use correct evaluators

* Refactored tests to remove duplicate code, and fixed Contains/multi-components

* Gradle build disallows using getDeclaredField

* Fixed cases where rectangles cross the dateline

* Fixed meta function tests

* Added ST_WITHIN to support inverting ST_CONTAINS

If the ST_CONTAINS is called with the constant on the left, we either have to create a lot more Evaluators to cover that case, or we have to invert it to ST_WITHIN. This inversion was a much easier option.

* Simplify inversion logic

* Add comment on choice of surrogate approach

* Add unit tests and missing fold() function

* Simple code cleanup

* Add integration tests for literals

* Add more integration tests based on actual data

* Generated documentation files

* Add documentation

* Fixed failing function count test

* Add tests that push-to-source works for ST_CONTAINS and ST_WITHIN

* Test more combinations of WITH/CONTAINS and literal on right and left

This also verifies that the re-writing of CONTAINS to WITHIN or vice versa occurs when the literal is on the left.

* test that physical planning also handles doc-values from STATS

* Added more tests for WITHIN/CONTAINS together with CENTROID

This should test the doc-values for points.

* Add cartesian_point tests

* Add cartesian_shape tests

* Disable Lucene-push-down for CARTESIAN data

This is a limitation in Lucene, which we could address as a performance optimization in a future PR, but since it probably requires Lucene changes, it cannot be done in this work.

* Fix doc links

* Added test data and tests for cartesian multi-polygons

Testing INTERSECTS, CONTAINS and WITHIN with multi-polydon fields

* Use required features for spatial points, shapes and centroid

* 8.13.0 is not yet historical version

This needs to be reverted as soon as 8.13.0 is released

* Added st_intersects and st_contains_within 'features'

* Code review updates

* Re-enable lucene push-down

* Added more required_features

* Fix point contains non-point

* Fix point contains point

* Re-enable lucene push-down in tests too

Forgot to change the physical planner unit tests after re-enabling lucene push-down

* Generate automatic docs

* Use generated examples docs

* Generated examples use '-result' prefix (singular)

* Mark spatial functions as preview/experimental
2024-04-02 10:31:00 +02:00
..
functions ESQL: Support ST_CONTAINS and ST_WITHIN (#106503) 2024-04-02 10:31:00 +02:00
processing-commands Add docs for cross cluster search in ES|QL(#105934) 2024-03-07 13:15:01 -08:00
source-commands ESQL: Rename SHOW FUNCTIONS to META FUNCTIONS (#106362) 2024-03-19 13:02:34 +01:00
esql-across-clusters.asciidoc Add docs for cross cluster search in ES|QL(#105934) 2024-03-07 13:15:01 -08:00
esql-apis.asciidoc Add ES|QL async query api docs (#104054) 2024-01-09 09:17:02 +00:00
esql-async-query-api.asciidoc Mute ESQL async docs tests (#106294) 2024-03-13 11:08:12 -04:00
esql-async-query-delete-api.asciidoc Add ES|QL async query api docs (#104054) 2024-01-09 09:17:02 +00:00
esql-async-query-get-api.asciidoc Add ES|QL async query api docs (#104054) 2024-01-09 09:17:02 +00:00
esql-commands.asciidoc [DOCS] Getting started with ES|QL queries guide (#101634) 2023-11-03 13:47:09 +01:00
esql-enrich-data.asciidoc [DOCS] ES|QL limitations (#101673) 2023-11-03 13:57:23 +01:00
esql-examples.asciidoc [DOCS] Small ES|QL improvements (#101877) 2023-11-07 17:24:59 +01:00
esql-functions-operators.asciidoc Add two new OGC functions ST_X and ST_Y (#105768) 2024-03-06 11:19:54 +01:00
esql-get-started.asciidoc [DOCS][ESQL] Add link to getting started notebook (#106345) 2024-03-14 17:33:31 +01:00
esql-kibana.asciidoc ES|QL: Set default query LIMIT to 1000 (#105618) 2024-02-21 09:25:25 +01:00
esql-language.asciidoc [DOCS] One more round of restructuring the ES|QL documentation (#101340) 2023-10-26 10:57:05 +02:00
esql-limitations.asciidoc ESQL: Fix error on sorting unsortable geo_point and cartesian_point (#106351) 2024-03-14 23:16:53 +01:00
esql-process-data-with-dissect-grok.asciidoc [DOCS] Empty keys for ES|QL DISSECT (#102632) 2023-12-11 11:23:27 +01:00
esql-query-api.asciidoc [DOCS][ESQL] Document locale rest parameter (#104985) 2024-02-06 10:36:51 +01:00
esql-rest.asciidoc Mute ESQL async docs tests (#106294) 2024-03-13 11:08:12 -04:00
esql-security-solution.asciidoc Update esql-security-solution.asciidoc (#104531) 2024-01-18 15:48:43 +01:00
esql-syntax.asciidoc [DOCS] ES|QL backtick changes in 8.13 (#103958) 2024-01-08 12:13:16 +01:00
esql-using.asciidoc Add docs for cross cluster search in ES|QL(#105934) 2024-03-07 13:15:01 -08:00
index.asciidoc Add docs for cross cluster search in ES|QL(#105934) 2024-03-07 13:15:01 -08:00
metadata-fields.asciidoc ESQL: Grammar - FROM METADATA no longer require [] (#105221) 2024-02-08 07:03:19 -08:00
multivalued-fields.asciidoc ESQL: Nested expressions inside stats command (#104387) 2024-01-17 15:49:20 -08:00
task-management.asciidoc [DOCS] One more round of restructuring the ES|QL documentation (#101340) 2023-10-26 10:57:05 +02:00