Closed mohsinh closed 11 years ago
Added support for Dynamic Mapping in cae34e50986ba3d1c58f7634da1e88202de409eb
e.g using ElasticsearchTemplate
@Document(indexName = "test-mapping", type = "mapping")
public class SampleMappingEntity {
@Id
private String id;
@Field(type = "string",index = "not_analyzed", store = true, searchAnalyzer = "standard", indexAnalyzer = "standard")
private String message;
//... getters and setters ..
}
elasticsearchTemplate.putMapping(entity);
Spring Data Elasticsearch should automatically create mapping if it is not created for given entity.
e.g