'Only create new fields'

def update_collection(self, name, fields):

    api = SolrApi(SOLR_URL.get(), self.user, SECURITY_ENABLED.get())
    old_field_names = api.fields(name)['schema']['fields'].keys()
    new_fields = filter((lambda field: (field['name'] not in old_field_names)), fields)
    new_fields_filtered = []
    for field in new_fields:
        new_field = {}
        for attribute in filter((lambda attribute: (attribute in field)), ALLOWED_FIELD_ATTRIBUTES):
            new_field[attribute] = field[attribute]
        new_fields_filtered.append(new_field)
    api.add_fields(name, new_fields_filtered)
