How to create query to join two types

I have two types as below:
type_user {
user_id,
type_id
}
//one user_id has many type_id
row_data {
row_id,
type_id
}
//row_data.type_id = type_user.type_id
I want to get all rows in row_data by join type_user and row_data with parameter is user_id.How to write query DSL? Anyone can help me for this problem?

Elasticsearch does not support arbitrary joins. You would need to think about how best to model your data, the most commont options are to denormalize your data entirely, use nested documents, or Elasticsearch`s support for parent/child relations as a last resort.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.