Skip to content

Commit 74d627a

Browse files
Apply suggestions from code review
Co-authored-by: Liam Thompson <[email protected]>
1 parent b5fd81f commit 74d627a

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

docs/reference/query-languages/esql/esql-commands.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -665,7 +665,7 @@ FROM employees
665665

666666
## `LOOKUP JOIN` [esql-lookup-join]
667667

668-
`LOOKUP JOIN` is useful for any scenario where you need to pull in information from a lookup index to streamline data enrichment and analysis.
668+
`LOOKUP JOIN` enables you to add data from another index, AKA a 'lookup' index, to your {esql} query results, simplifying data enrichment and analysis workflows.
669669

670670
**Syntax**
671671

@@ -681,7 +681,10 @@ TBD
681681

682682
**Description**
683683

684-
TBD
684+
The `LOOKUP JOIN` command adds new columns to your {esql} query results table by finding documents in a lookup index that share the same join field value as your result rows.
685+
686+
For each row in your results table that matches a document in the lookup index based on the join field, all fields from the matching document are added as new columns to that row.
687+
If multiple documents in the lookup index match a single row in your results, the output will contain one row for each matching combination.
685688

686689
**Examples**
687690

docs/reference/query-languages/esql/esql-enrich-data.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ For example, you can use `ENRICH` to:
1515
* Add product information to retail orders based on product IDs
1616
* Supplement contact information based on an email address
1717

18-
[`ENRICH`](/reference/query-languages/esql/esql-commands.md#esql-enrich) is similar to [`LOOKUP join`](/reference/query-languages/esql/esql-commands.md#esql-lookup-join) in the fact that they both help you join data together. You should use `ENRICH` when:
18+
[`ENRICH`](/reference/query-languages/esql/esql-commands.md#esql-enrich) is similar to [`LOOKUP join`](/reference/query-languages/esql/esql-commands.md#esql-lookup-join) as both commands allow you to combine data from different sources. You should use `ENRICH` when:
1919

2020
* Enrichment data doesn't change frequently
2121
* You can accept index-time overhead

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ The {{esql}} [`LOOKUP join`](/reference/query-languages/esql/esql-commands.md#es
1010

1111
For example, you can use `LOOKUP JOIN` to:
1212

13-
* Pull in environment or ownership details for each host to correlate your metrics data.
13+
* Retrieve environment or ownership details for each host to correlate your metrics data.
1414
* Quickly see if any source IPs match known malicious addresses.
1515
* Tag logs with the owning team or escalation info for faster triage and incident response.
1616

@@ -96,7 +96,7 @@ The following are the current limitations with `LOOKUP JOIN`
9696

9797
* `LOOKUP JOIN` will be sucessfull if both left and right type of the join are both `KEYWORD` types or if the left type is of `TEXT` and the right type is `KEYWORD`.
9898
* Indices in [lookup](/reference/elasticsearch/index-settings/index-modules.md#index-mode-setting) mode are always single-sharded.
99-
* Cross cluster search is unsupported. Both source and lookup indicies must be local.
99+
* Cross cluster search is unsupported. Both source and lookup indices must be local.
100100
* `LOOKUP JOIN` can only use a single match field, and can only use a single index. Wildcards, aliases, datemath, and datastreams are not supported.
101101
* 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 renames or evals to achieve.
102102
* The query will circuit break if many documents from the lookup index have the same key. A large heap is needed to manage results of multiple megabytes per key.

0 commit comments

Comments
 (0)