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
Copy file name to clipboardExpand all lines: docs/reference/esql/esql-lookup-join.asciidoc
+10-7Lines changed: 10 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -61,7 +61,7 @@ contains multi-valued entries, those entries will not match anything
61
61
[[esql-lookup-join-example]]
62
62
==== Example
63
63
64
-
`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.
64
+
`LOOKUP JOIN` has left-join behavior. If no rows match in the lookup index, `LOOKUP JOIN` retains the incoming row and adds nulls. If many rows in the lookup index match, `LOOKUP JOIN` adds one row per match.
65
65
66
66
In this example, we have two sample tables:
67
67
@@ -151,8 +151,11 @@ as the same type in {esql}
151
151
`int`)
152
152
*** `float`, `half_float`, and `scaled_float` are compatible
153
153
with `double` (all represented as `double`)
154
-
** For text fields: You can use text fields on the left-hand side of the
155
-
join only if they have a `.keyword` subfield
154
+
** For text fields: You can only use text fields as the join key on the
155
+
left-hand side of the join and only if they have a `.keyword` subfield
156
+
157
+
To obtain a join key with a compatible type, use a
158
+
<<esql-type-conversion-functions,conversion function>> if needed.
156
159
157
160
For a complete list of supported data types and their internal
158
161
representations, see the <<esql-supported-types,Supported Field Types documentation>>.
@@ -164,14 +167,14 @@ representations, see the <<esql-supported-types,Supported Field Types documentat
164
167
The following are the current limitations with `LOOKUP JOIN`
165
168
166
169
* Indices in <<index-mode-setting,lookup>> mode are always single-sharded.
167
-
* Cross cluster search is unsupported. Both source and lookup indices
170
+
* Cross cluster search is unsupported initially. Both source and lookup indices
168
171
must be local.
169
172
* Currently, only matching on equality is supported.
170
173
* `LOOKUP JOIN` can only use a single match field and a single index.
171
174
Wildcards, aliases, datemath, and datastreams are not supported.
172
-
* The name of the match field in `LOOKUP JOIN lu_idx ON match_field` must match
173
-
an existing field in the query. This may require `RENAME`s or `EVAL`s to
174
-
achieve.
175
+
* The name of the match field in
176
+
`LOOKUP JOIN lu++_++idx ON match++_++field` must match an existing field
177
+
in the query. This may require renames or evals to achieve.
175
178
* The query will circuit break if there are too many matching documents
176
179
in the lookup index, or if the documents are too large. More precisely,
177
180
`LOOKUP JOIN` works in batches of, normally, about 10,000 rows; a large
0 commit comments