Skip to content

Commit e585342

Browse files
Mode docs changes
1 parent 606c099 commit e585342

File tree

2 files changed

+12
-13
lines changed

2 files changed

+12
-13
lines changed

docs/reference/query-languages/esql/_snippets/commands/layout/lookup-join.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,22 @@ FROM <source_index>
1717
| LOOKUP JOIN <lookup_index> ON <field_name>
1818
```
1919

20+
```esql
21+
FROM <source_index>
22+
| LOOKUP JOIN <lookup_index> ON <field_name1>, <field_name2>, <field_name3>
23+
```
24+
2025
**Parameters**
2126

2227
`<lookup_index>`
2328
: The name of the lookup index. This must be a specific index name - wildcards, aliases, and remote cluster references are not supported. Indices used for lookups must be configured with the [`lookup` index mode](/reference/elasticsearch/index-settings/index-modules.md#index-mode-setting).
2429

25-
`<field_name>`
26-
: The field to join on. This field must exist in both your current query results and in the lookup index. If the field contains multi-valued entries, those entries will not match anything (the added fields will contain `null` for those rows).
30+
`<field_name>` or `<field_name1>, <field_name2>, <field_name3>`
31+
: The field(s) to join on. Can be either:
32+
* A single field name
33+
* A comma-separated list of field names {applies_to}`stack: ga 9.2`
34+
: These fields must exist in both your current query results and in the lookup index. If the fields contains multi-valued entries, those entries will not match anything (the added fields will contain `null` for those rows).
35+
2736

2837
**Description**
2938

@@ -32,7 +41,7 @@ results table by finding documents in a lookup index that share the same
3241
join field value as your result rows.
3342

3443
For each row in your results table that matches a document in the lookup
35-
index based on the join field, all fields from the matching document are
44+
index based on the join fields, all fields from the matching document are
3645
added as new columns to that row.
3746

3847
If multiple documents in the lookup index match a single row in your

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

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -49,16 +49,6 @@ LOOKUP JOIN <lookup_index> ON <field_name1>, <field_name2>, <field_name3> # Joi
4949

5050
If you're familiar with SQL, `LOOKUP JOIN` has left-join behavior. This means that if no rows match in the lookup index, the incoming row is retained and `null`s are added. If many rows in the lookup index match, `LOOKUP JOIN` adds one row per match.
5151

52-
```{applies_to}
53-
stack: ga 9.2
54-
serverless: ga
55-
```
56-
`LOOKUP JOIN` on more than one field is also supported. You can specify a comma separated list of fields to join on.
57-
58-
```esql
59-
LOOKUP JOIN <lookup_index> ON <field_name1>, <field_name2>, <field_name3>
60-
```
61-
6252
## Example
6353

6454
You can run this example for yourself if you'd like to see how it works, by setting up the indices and adding sample data.

0 commit comments

Comments
 (0)