I have a field with mapping:
"my_field_name": {
"type": "nested",
"properties": {
"labels": {
"type": "text"
},
"source": {
"type": "text"
}
}
}
and when I put data, format is like:
"my_field_name": {
"url_of_an_image": [
"tag1",
"tag2",
"tag3",
"tag4",
"tag5"
],
"url_of_an_image2": [
"tag4",
"tag5",
"tag6",
"tag7",
"tag8"
]
}
I want to write an elasticsearch query to gather all the documents that contains given tag.
How can I search a tag in all documents and select the ones that contains given tag?
Thank you