use of org.springframework.data.elasticsearch.annotations.Setting in project spring-data-elasticsearch by spring-projects.
the class SimpleElasticsearchPersistentEntity method buildSettingsParameter.
private SettingsParameter buildSettingsParameter(Class<?> clazz) {
SettingsParameter settingsParameter = new SettingsParameter();
Document documentAnnotation = AnnotatedElementUtils.findMergedAnnotation(clazz, Document.class);
Setting settingAnnotation = AnnotatedElementUtils.findMergedAnnotation(clazz, Setting.class);
if (documentAnnotation != null) {
settingsParameter.useServerConfiguration = documentAnnotation.useServerConfiguration();
settingsParameter.shards = documentAnnotation.shards();
settingsParameter.replicas = documentAnnotation.replicas();
settingsParameter.refreshIntervall = documentAnnotation.refreshInterval();
settingsParameter.indexStoreType = documentAnnotation.indexStoreType();
}
if (settingAnnotation != null) {
processSettingAnnotation(settingAnnotation, settingsParameter);
}
return settingsParameter;
}