i have these documents in Elasticsearch:
{
"id_object": "9",
"size_id": "-1",
"enabled": 1,
"verified": 0,
"countries": [
"Germany"
]
},
{
"id_object": "19",
"size_id": "-1",
"enabled": 1,
"verified": 0,
"countries": [
"Germany",
"France"
]
}
I use the following query to fetch all documents that have "Germany" inside:
GET abc/def/_search
{
"query": {
"filtered": {
"filter": {
"bool": {
"must": {
"term": {
"countries": "Germany"
}
}
}
}
}
} }
but it returns no results! what am i doing wrong?