I adapted the query by this post. Try please.
{
"query": {
"bool": {
"must": [
{
"nested": {
"path": "fruits",
"query": {
"bool": {
"must_not": [
{
"terms": {
"fruits.name": [
"apple",
"pineapple",
"grape",
"orange",
"pear"
]
}
}
]
}
}
}
}
]
}
}
}