/**
* {@inheritDoc}
*/
@Override
public IndexStructure read(String file) throws IOException {
ElasticSearchFieldsDefinitionReader reader = new ElasticSearchFieldsDefinitionReader(new File(file));
List<FieldAttributes> fields = reader.readFields();
IndexStructure structure = new BasicIndexStructure();
for (FieldAttributes field : fields) {
structure.addField(field.name(), field);
}
return structure;