@staticmethod
def text_query(phrase, operator='and'):
    """
        Static method to return a filter dict to match a text search. Can be
        overridden in a subclass to customize behavior.
        """
    return {'match': {'_all': {'query': phrase, 'operator': operator,
        'analyzer': 'content'}}}
