elasticsearch/docs/reference/esql
Craig Taverner f3cd48209e
Added stricter range type checks and runtime warnings for ENRICH (#115091)
It has been noted that strange or incorrect error messages are returned if the ENRICH command uses incompatible data types, for example a KEYWORD with value 'foo' using in an int_range match: https://github.com/elastic/elasticsearch/issues/107357

This error is thrown at runtime and contradicts the ES|QL policy of only throwing errors at planning time, while at runtime we should instead set results to null and add a warning. However, we could make the planner stricter and block potentially mismatching types earlier.

However runtime parsing of KEYWORD fields has been a feature of ES|QL ENRICH since it's inception, in particular we even have tests asserting that KEYWORD fields containing parsable IP data can be joined to an ip_range ENRICH index.

In order to not create a backwards compatibility problem, we have compromised with the following:

* Strict range type checking at the planner time for incompatible range types, unless the incoming index field is KEYWORD
* For KEYWORD fields, allow runtime parsing of the fields, but when parsing fails, set the result to null and add a warning

Added extra tests to verify behaviour of match policies on non-keyword fields. They all behave as keywords (the enrich field is converted to keyword at policy execution time, and the input data is converted to keyword at lookup time).
2024-11-19 16:34:21 +01:00
..
functions [ES|QL][DOCS] Add docs for date_period and time_duration (#116368) 2024-11-19 07:48:35 -05:00
processing-commands [DOCS] ES|QL: Adding a tip to the WHERE documentation (#114050) 2024-10-14 13:05:12 -05:00
source-commands ESQL: Validate unique plan attribute names (#110488) 2024-07-17 11:39:02 +02:00
esql-across-clusters.asciidoc CCS metadata is opt-in in ESQL JSON responses (#114437) 2024-10-11 15:03:26 -04:00
esql-apis.asciidoc (Doc+) Link API doc to parent object - part1 (#111951) 2024-08-20 14:58:18 -06:00
esql-async-query-api.asciidoc Remove esql version from docs (#108933) 2024-05-23 10:36:15 -04:00
esql-async-query-delete-api.asciidoc (Doc+) Link API doc to parent object - part1 (#111951) 2024-08-20 14:58:18 -06: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 ESQL: INLINESTATS (#109583) 2024-07-24 17:16:37 -04:00
esql-enrich-data.asciidoc Added stricter range type checks and runtime warnings for ENRICH (#115091) 2024-11-19 16:34:21 +01:00
esql-examples.asciidoc [DOCS] Small ES|QL improvements (#101877) 2023-11-07 17:24:59 +01:00
esql-functions-operators.asciidoc ES|QL Add full-text search to the functions docs page (#116024) 2024-11-01 12:04:55 +00:00
esql-get-started.asciidoc Revert "[DOCS] Remove ESQL demo env link from 8.14+ (#109562)" (#109579) 2024-06-11 17:04:37 +02:00
esql-kibana.asciidoc refresh ESQL kibana docs (#116441) 2024-11-08 10:39:18 +01:00
esql-language.asciidoc [ES|QL][DOCS] Add docs for date_period and time_duration (#116368) 2024-11-19 07:48:35 -05:00
esql-limitations.asciidoc Refine ESQL limitations (full-text, TEXT fields, unassigned indexes) (#116098) 2024-11-01 17:03:49 +01:00
esql-multi-index.asciidoc ESQL: Fix for overzealous validation in case of invalid mapped fields (#111475) 2024-08-09 09:38:14 +02:00
esql-process-data-with-dissect-grok.asciidoc ES|QL: improve docs about escaping for GROK, DISSECT, LIKE, RLIKE (#115320) 2024-10-24 09:19:46 +02:00
esql-query-api.asciidoc Remove duplicate 'the the' (#116023) 2024-10-31 19:14:58 +01:00
esql-rest.asciidoc Collect and display execution metadata for ES|QL cross cluster searches (#112595) 2024-09-30 16:03:39 -04:00
esql-security-solution.asciidoc Update esql-security-solution.asciidoc (#104531) 2024-01-18 15:48:43 +01:00
esql-syntax.asciidoc [ES|QL][DOCS] Add docs for date_period and time_duration (#116368) 2024-11-19 07:48:35 -05:00
esql-using.asciidoc Union types documentation (#110183) 2024-07-16 12:06:19 +02:00
implicit-casting.asciidoc [ES|QL][DOCS] Add docs for date_period and time_duration (#116368) 2024-11-19 07:48:35 -05:00
index.asciidoc [DOCS] ESQL goes GA (#108342) 2024-05-07 14:12:50 +02:00
metadata-fields.asciidoc Reapply "ESQL: Expose "_ignored" metadata field" (#108864) (#108871) 2024-05-22 07:06:04 -04:00
multivalued-fields.asciidoc Docs: ESQL doesn't preserve nulls in a list (#114335) 2024-10-09 03:17:56 +11:00
task-management.asciidoc [DOCS] One more round of restructuring the ES|QL documentation (#101340) 2023-10-26 10:57:05 +02:00
time-spans.asciidoc [ES|QL][DOCS] Add docs for date_period and time_duration (#116368) 2024-11-19 07:48:35 -05:00