List of usage examples for org.springframework.data.solr.core.schema SchemaDefinition getFields
public List<FieldDefinition> getFields()
From source file:org.springframework.data.solr.core.schema.SolrSchemaWriter.java
protected void updateSchema(SchemaDefinition schemaDefinition) { SchemaDefinition existing = loadExistingSchema(schemaDefinition.getCollectionName()); List<FieldDefinition> fieldsToBeCreated = new ArrayList<FieldDefinition>(); for (FieldDefinition fieldDefinition : schemaDefinition.getFields()) { if (!existing.containsField(fieldDefinition.getName())) { fieldsToBeCreated.add(fieldDefinition); }/*from w w w.jav a2s . c o m*/ } writeFieldDefinitions(fieldsToBeCreated, schemaDefinition.getCollectionName()); }