def _generate_malformed_query(data):
        """Generates a query on the ``_all`` field with all the query content.

        Args:
            data (six.text_type or list): The query in the format of ``six.text_type`` (when used from parsing driver)
                or ``list`` when used from withing the ES visitor.
        """
        if isinstance(data, six.text_type):
            # Remove colon character (special character for ES)
            query_str = data.replace(':', ' ')
        else:
            query_str = ' '.join([word.strip(':') for word in data.children])

        return {
            'simple_query_string': {
                'fields': ['_all'],
                'query': query_str
            }
        }
def _generate_malformed_query ( data ) : if isinstance ( data , six . text_type ) : query_str = data . replace ( ':' , ' ' ) else : query_str = ' ' . join ( [ word . strip ( ':' ) for word in data . children ] ) return { 'simple_query_string' : { 'fields' : [ '_all' ] , 'query' : query_str } }
Generates a query on the ``_all`` field with all the query content.

        Args:
            data (six.text_type or list): The query in the format of ``six.text_type`` (when used from parsing driver)
                or ``list`` when used from withing the ES visitor.