def parse_command_line_args(text):
    """Parses string of command line args into a dict.
    Only basic parsing is supported at the moment.
    Each parameter starting with '--' is transformed into a key,
    and everything which follows is taken as a string value.
    Each value has a prefix ' ' in order to avoid schema inference in Elasticsearch.
    This is done because Elasticsearch may incorrectly interpret some of the values which would result in errors.

    :param text: string containing all command line args
    :return: dictionary {arg_name: string_value}
    """
    result = {}
    for param in text.split('--'):
        if param != '':
            words = param.strip(' ').split(' ')
            key = words[0]
            # Below we start with space to avoid auto schema inference in Elasticsearch,
            # so that all params are string
            value = ' ' + ''.join(words[1:])
            result[key] = value
    return result