Nested bool querie

Hi,
I'm pretty new to queries in elastic and need some help to understand how the post_filter below is executed for both when a document has the _id field and when it doesn't have it :slight_smile:

"post_filter": {
        "bool": {
            "must": [
                {
                    "bool": {
                        "should": [
                            {
                                "bool": {
                                    "must_not": [
                                        {
                                            "exists": {
                                                "field": "_id",
                                                "boost": 1.0
                                            }
                                        }
                                    ],
                                    "boost": 1.0
                                }
                            }
                        ],
                        "boost": 1.0
                    }
                }
            ],
            "boost": 1.0
        }
    }

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.