CopyPastor

Detecting plagiarism made easy.

Score: 0.9592700419658815; Reported for: String similarity Open both answers

Possible Plagiarism

Reposted on 2025-05-08
by slhck

Original Post

Original - Posted on 2025-05-08
by slhck



            
Present in both answers; Present only in the new answer; Present only in the old answer;

With [ES|QL](https://www.elastic.co/docs/explore-analyze/query-filter/languages/esql), Elasticsearch has finally added the possibility to perform actual `JOIN`s on multiple indices. This is available since Elastic 8.18 and called [LOOKUP JOIN](https://www.elastic.co/guide/en/elasticsearch/reference/8.x/esql-commands.html#esql-lookup-join):
``` FROM <source_index> | LOOKUP JOIN <lookup_index> ON <field_name> ```
It might work like this:
![](https://i.sstatic.net/UFDt3OED.png)(https://i.sstatic.net/UFDt3OED.png)
(Image is from [their blog article](https://www.elastic.co/blog/esql-lookup-join-elasticsearch) on the subject.)
So in your case, the query would be:
``` FROM order | LOOKUP JOIN order_item ON order_id ```
However, the current limitation is that the field names must be the same in both indexes, so you would have to rename your `id` column in `order` to `order_id`.
With [ES|QL](https://www.elastic.co/docs/explore-analyze/query-filter/languages/esql), Elasticsearch has finally added the possibility to perform actual `JOIN`s on multiple indices. This is available since Elastic 8.18 and called [LOOKUP JOIN](https://www.elastic.co/guide/en/elasticsearch/reference/8.x/esql-commands.html#esql-lookup-join):
``` FROM <source_index> | LOOKUP JOIN <lookup_index> ON <field_name> ```
It might work like this:
![](https://i.sstatic.net/UFDt3OED.png)](https://i.sstatic.net/UFDt3OED.png)
(Image is from [their blog article](https://www.elastic.co/blog/esql-lookup-join-elasticsearch) on the subject.)
So in your case, the query would be:
``` FROM post | LOOKUP JOIN profile ON profile_id ```
However, the current limitation is that the field names must be the same in both indexes.

        
Present in both answers; Present only in the new answer; Present only in the old answer;