Skip to content

Commit 3536c6d

Browse files
authored
[8.x] ESQL: Improve LOOKUP JOIN page (#125688)
Some minor edits, formatting improvements etc.
1 parent ce367e9 commit 3536c6d

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

docs/reference/esql/esql-lookup-join.asciidoc

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ contains multi-valued entries, those entries will not match anything
6161
[[esql-lookup-join-example]]
6262
==== Example
6363

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.
6565

6666
In this example, we have two sample tables:
6767

@@ -151,8 +151,11 @@ as the same type in {esql}
151151
`int`)
152152
*** `float`, `half_float`, and `scaled_float` are compatible
153153
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.
156159

157160
For a complete list of supported data types and their internal
158161
representations, see the <<esql-supported-types,Supported Field Types documentation>>.
@@ -164,14 +167,14 @@ representations, see the <<esql-supported-types,Supported Field Types documentat
164167
The following are the current limitations with `LOOKUP JOIN`
165168

166169
* 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
168171
must be local.
169172
* Currently, only matching on equality is supported.
170173
* `LOOKUP JOIN` can only use a single match field and a single index.
171174
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.
175178
* The query will circuit break if there are too many matching documents
176179
in the lookup index, or if the documents are too large. More precisely,
177180
`LOOKUP JOIN` works in batches of, normally, about 10,000 rows; a large

0 commit comments

Comments
 (0)