A family of match queries that accept text/numerics/dates, analyzes it, and constructs a query out of it. For example:

        {
            "match" : {
                "message" : "this is a test"
            }
        }
        Note, message is the name of a field, you can subsitute the name of any field (including _all) instead.

def match(cls, field, query, operator=None):
        '''
        A family of match queries that accept text/numerics/dates, analyzes it, and constructs a query out of it. For example:

        {
            "match" : {
                "message" : "this is a test"
            }
        }
        Note, message is the name of a field, you can subsitute the name of any field (including _all) instead.
        '''
        instance = cls(match={field: {'query': query}})
        if operator is not None:
            instance['match'][field]['operator'] = operator

        return instance