I have created parent child relationship between two index type.but while searching it is giving no records.
my code is:
GET /join_query_logic/Wallet_Location_Dim/_search
{
"query": {
"has_child": {
"type": "User_Wallet_Location",
"query": {
"constant_score" : {
"filter" : {
"term" : {
"wallet_location_id" : 1
}
}
}
}
}
}
}
where index: join_query_logic, parent: Wallet_Location_Dim, child: User_Wallet_Location.
I want to get only those records from parent type which has wallet_location_id presented in child type.