You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Support types table in lookup join docs
* Don't show a results column in the join types
* Make LOOKUP JOIN types table more compact
* Update docs/reference/query-languages/esql/esql-lookup-join.md
Co-authored-by: Liam Thompson <[email protected]>
Co-authored-by: Alexander Spies <[email protected]>
Copy file name to clipboardExpand all lines: docs/reference/query-languages/esql/esql-lookup-join.md
+28-9Lines changed: 28 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -142,19 +142,38 @@ Refer to the examples section of the [`LOOKUP JOIN`](/reference/query-languages/
142
142
143
143
## Prerequisites [esql-lookup-join-prereqs]
144
144
145
-
To use `LOOKUP JOIN`, the following requirements must be met:
145
+
### Index configuration
146
146
147
-
* Indices used for lookups must be configured with the [`lookup` index mode](/reference/elasticsearch/index-settings/index-modules.md#index-mode-setting)
148
-
***Compatible data types**: The join key and join field in the lookup index must have compatible data types. This means:
149
-
* The data types must either be identical or be internally represented as the same type in {{esql}}
150
-
* Numeric types follow these compatibility rules:
151
-
*`short` and `byte` are compatible with `integer` (all represented as `int`)
152
-
*`float`, `half_float`, and `scaled_float` are compatible with `double` (all represented as `double`)
153
-
* For text fields: You can only use text fields as the join key on the left-hand side of the join and only if they have a `.keyword` subfield
147
+
Indices used for lookups must be configured with the [`lookup` index mode](/reference/elasticsearch/index-settings/index-modules.md#index-mode-setting).
154
148
149
+
### Data type compatibility
150
+
151
+
Join keys must have compatible data types between the source and lookup indices. Types within the same compatibility group can be joined together:
|**Keyword family**|`keyword`, `text.keyword`| Text fields only as join key on left-hand side and must have `.keyword` subfield |
157
+
|**Date (Exact)**|`date`| Must match exactly |
158
+
|**Date Nanos (Exact)**|`date_nanos`| Must match exactly |
159
+
|**Boolean**|`boolean`| Must match exactly |
160
+
161
+
```{tip}
155
162
To obtain a join key with a compatible type, use a [conversion function](/reference/query-languages/esql/functions-operators/type-conversion-functions.md) if needed.
163
+
```
156
164
157
-
For a complete list of supported data types and their internal representations, see the [Supported Field Types documentation](/reference/query-languages/esql/limitations.md#_supported_types).
165
+
### Unsupported Types
166
+
167
+
In addition to the [{{esql}} unsupported field types](/reference/query-languages/esql/limitations.md#_unsupported_types), `LOOKUP JOIN` does not support:
168
+
169
+
*`VERSION`
170
+
*`UNSIGNED_LONG`
171
+
* Spatial types like `GEO_POINT`, `GEO_SHAPE`
172
+
* Temporal intervals like `DURATION`, `PERIOD`
173
+
174
+
```{note}
175
+
For a complete list of all types supported in `LOOKUP JOIN`, refer to the [`LOOKUP JOIN` supported types table](/reference/query-languages/esql/commands/processing-commands.md#esql-lookup-join).
Copy file name to clipboardExpand all lines: x-pack/plugin/esql/src/internalClusterTest/java/org/elasticsearch/xpack/esql/action/LookupJoinTypesIT.java
0 commit comments