Select match values from another document in elastic

Dears,

how we can convert below sql query to DSL , i have created documents via ELK and i want draw flowchart in kibana

select * from document1 where field1 value in (select field2 from document2)

Thanks
salim

That looks like a join, which Elasticsearch does not support. You may need to change how you model your data.