I want to get documents like below with match from Elasticsearch.
{
"configurationId": "dp4wb8kpw4k1s2z",
"type": 1,
"items": [
{
"text": "car",
"rank": 1
},
{
"text": "ship",
"rank": 2
}
],
"date": "2021-07-08"
}
But I want a match on all objects in the items array and I want to get documents with this match. For example, the text value of the object with a rank value of 1 in the items array should definitely be "car", and the text value of the object with a rank value of 2 in the array should definitely be "ship".
How do I write a query in Elasticsearch for this?