Check if nested object not exists

Hello.

I want to check if an document miss a nested object (and the opposite too).
I want to get all documents which contain a marketplace that does not have
a price array.
This is part of my query (there are "and filter" because there can be more
than one restriction) :

{
"nested": {
"filter": {
"and": {
"filters": [,{
"nested": {
"filter": {
"and": {
"filters": [
{

"not": {

"filter": {

"exists": {

"field": "marketplace.price.id"

}
}
}
}
]
}
},
"path":
"marketplace.price"
}
}
]
}
},
"path": "marketplace"
}
}

both marketplace and price are mapped : "nested".

I have two marketplaces. One has a price array, one does not have a price
array. In the same document. With the query above I don't get a hit.

Can someone give me a hint or solution for that problem?

Cheers,
Elke

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/fd9b38a2-8bd1-4175-ace1-588917056dfc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.