Hello =)
I am using elastic search in version 5.6.4 and want to find entries where a field "tags" is existent. One rule of this query is "At least one non- null
value is required." However, I want to treat empty fields as existent too. Here is a tiny example:
DELETE days
POST days/day
{
"name": "monday"
}
POST days/day
{
"tags": []
}
POST days/day
{
"tags": [""]
}
POST days/day
{
"tags": ["sunny"]
}
GET days/_search
{
"query": {
"exists": {
"field": "tags"
}
}
}
So basically I want to find all entries except the first one, where this field is really not there.
Is there another query to achieve this? Because I find it a bit odd to have empty strings as placeholders.