ElasticSearch – How to query a query from a dynamic field metadata?
The metadata field is dynamic and there may be internal fields yes or no.
How can I return a query even if the "deleted" field is not defined in some of them?
Thank you for listening.
{
"request": {
"nested": {
"path": "metadata",
"request": {
"bool": {
"Should":[
{
"match":{
"metadata.deleted": true
}
}
]
}
}
}
"bool": {
"must": {
"term": {
"on_behalf_of": "b71457f731d8a6f"
}
}
}
}
}
{
"Fault": {
"root cause": [
{
"type": "parsing_exception",
"reason": "[nested] malformed request, expected [END_OBJECT] but found [FIELD_NAME]"
"line 1,
"collar": 116
}
],
"type": "parsing_exception",
"reason": "[nested] malformed request, expected [END_OBJECT] but found [FIELD_NAME]"
"line 1,
"collar": 116
}
"status": 400
}