Skip to content

Commit

Permalink
Polishing.
Browse files Browse the repository at this point in the history
Signed-off-by: Youssef Aouichaoui <[email protected]>
  • Loading branch information
youssef3wi committed Sep 6, 2024
1 parent 9b66c69 commit e38fbb3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -265,10 +265,10 @@ private void refreshEntitiesMapping() {
ClusterMapping clusterMapping = getClusterMapping();
for (ClusterMapping.ClusterMappingEntry mappingEntry : clusterMapping) {
// Get entity
Class<?> entity = null;
ElasticsearchPersistentEntity<?> entity = null;
for (ElasticsearchPersistentEntity<?> persistentEntity : this.elasticsearchConverter.getMappingContext().getPersistentEntities()) {
if (mappingEntry.getName().equals(persistentEntity.getIndexCoordinates().getIndexName())) {
entity = persistentEntity.getType();
entity = persistentEntity;

break;
}
Expand All @@ -281,7 +281,7 @@ private void refreshEntitiesMapping() {
if (mappingEntry.getMappings().containsKey("dynamic_templates")) {
Object dynamicTemplates = mappingEntry.getMappings().get("dynamic_templates");
if (dynamicTemplates instanceof List<?> value) {
getRequiredPersistentEntity(entity).buildDynamicTemplates(value);
entity.buildDynamicTemplates(value);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -961,7 +961,7 @@ private static class FieldAliasEntity {
}

@SuppressWarnings("unused")
@Document(indexName = "foo")
@Document(indexName = "#{@indexNameProvider.indexName()}-foo")
@DynamicTemplates(mappingPath = "/mappings/test-dynamic_templates_mappings_three.json")
private static class DynamicFieldDocument {
@Nullable
Expand Down

0 comments on commit e38fbb3

Please sign in to comment.