How can I search for an empty array or non empty array field in Kibana? To be more precise: There is an api that is used for queries and these requests/responses are logged. The search may result in an empty array if no elements have been found: 'response: []'. In other cases this "Response" field is an array populated with objects: 'response: [{"myProp": "something"}, {"myProp": "something2"}]'.
I've tried to use DSL queries, nested searches and other Stackoverflow answers but without success.
For the following I get syntax error (or for any other solution I try to use) in the Kibana DSL query:
"must_not": {
"script": {
"script": "response.size() > 0"
}
}
or using the following results in an Internal Server Error:
{
"script": "response.size > 0"
}