def add_inverse_query(self, key_val={}):
        """
        Add an es_dsl inverse query object to the es_dsl Search object

        :param key_val: a key-value pair(dict) containing the query to be added to the search object
        :returns: self, which allows the method to be chainable with the other methods
        """

        q = Q("match", **key_val)
        self.search = self.search.query(~q)
        return self
def add_inverse_query ( self , key_val = { } ) : q = Q ( "match" , ** key_val ) self . search = self . search . query ( ~ q ) return self
Add an es_dsl inverse query object to the es_dsl Search object

        :param key_val: a key-value pair(dict) containing the query to be added to the search object
        :returns: self, which allows the method to be chainable with the other methods