Skip to content

Commit bb558a5

Browse files
alex-spiesomricohenn
authored andcommitted
ESQL: Improve LOOKUP JOIN page (elastic#125688) (elastic#125798)
Forward port of elastic#125688
1 parent 2325125 commit bb558a5

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

docs/reference/query-languages/esql/esql-lookup-join.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ The `LOOKUP JOIN` command adds new columns to a table, with data from {{es}} ind
4242

4343
## Example
4444

45-
`LOOKUP JOIN` has left-join behavior. If no rows match in the looked index, `LOOKUP JOIN` retains the incoming row and adds `null`s. If many rows in the lookedup index match, `LOOKUP JOIN` adds one row per match.
45+
`LOOKUP JOIN` has left-join behavior. If no rows match in the lookup index, `LOOKUP JOIN` retains the incoming row and adds `null`s. If many rows in the lookup index match, `LOOKUP JOIN` adds one row per match.
4646

4747
In this example, we have two sample tables:
4848

@@ -112,7 +112,9 @@ To use `LOOKUP JOIN`, the following requirements must be met:
112112
* Numeric types follow these compatibility rules:
113113
* `short` and `byte` are compatible with `integer` (all represented as `int`)
114114
* `float`, `half_float`, and `scaled_float` are compatible with `double` (all represented as `double`)
115-
* For text fields: You can use text fields on the left-hand side of the join only if they have a `.keyword` subfield
115+
* 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
116+
117+
To obtain a join key with a compatible type, use a [conversion function](/reference/query-languages/esql/esql-functions-operators.md#esql-type-conversion-functions) if needed.
116118

117119
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).
118120

@@ -121,7 +123,7 @@ For a complete list of supported data types and their internal representations,
121123
The following are the current limitations with `LOOKUP JOIN`
122124

123125
* Indices in [lookup](/reference/elasticsearch/index-settings/index-modules.md#index-mode-setting) mode are always single-sharded.
124-
* Cross cluster search is unsupported. Both source and lookup indices must be local.
126+
* Cross cluster search is unsupported initially. Both source and lookup indices must be local.
125127
* Currently, only matching on equality is supported.
126128
* `LOOKUP JOIN` can only use a single match field and a single index. Wildcards, aliases, datemath, and datastreams are not supported.
127129
* The name of the match field in `LOOKUP JOIN lu_idx ON match_field` must match an existing field in the query. This may require `RENAME`s or `EVAL`s to achieve.

0 commit comments

Comments
 (0)