4

I want to filter data from elasic search document like documents which is having blank list. HOw can i achieve that. Suppose i want this results.

1) { name:'vipul', gender:[] }

this is having blank list

1

1 Answer 1

12

You can combine a bool query with a exists query like so:

"bool": {
    "must_not": [
        {
            "exists": {
                "field": "gender"
            }
        }
    ]
}
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.