Hi,
I have an index with nested objects (flags).
Example document:
{
"title": "Sample title",
"flags": [
{"read"}, {"marked"}
]
}
I want to query all documents which have more than one flag.
How can this be done?
I tried to filter by flags.size, but get the error: No field found for [flags] in mapping with types
"query": {
"bool": {
"filter": {
"script": {
"script": "if (doc['flags'].size > 1) {return (true)}"
}
}
}
}