I want to create the equivalent of the following query:
(country.id = 2000 AND natureservices.id = 2000 AND metiers.id = 1000) AND (shortname = "shortname" OR fullname = "fullname" OR categories.id = 1000 OR specialities.id = 2000)
in my case he must show me a single result but when i tried the below query it show many results
{ "query": {
"bool": {
"must": [
{ "term": { "country.id": 2000 } },
{ "term": { "natureservices.id": 2000 } },
{ "term": { "metiers.id": 1000 } },
{
"bool": {
"should": [
{ "term": { "shortname": "vgftQzSPwW" } },
{ "term": { "fullname": "qcouWRzFNG" } },
{ "term": { "categories.id": 1000 } },
{ "term": { "specialities.id": 2000 } }
], "minimum_should_match": 4
}
}
], "minimum_should_match": 3
}
} }