File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
main/java/org/springframework/data/elasticsearch/client/elc
test/java/org/springframework/data/elasticsearch/core/index Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -265,10 +265,10 @@ private void refreshEntitiesMapping() {
265265 ClusterMapping clusterMapping = getClusterMapping ();
266266 for (ClusterMapping .ClusterMappingEntry mappingEntry : clusterMapping ) {
267267 // Get entity
268- Class <?> entity = null ;
268+ ElasticsearchPersistentEntity <?> entity = null ;
269269 for (ElasticsearchPersistentEntity <?> persistentEntity : this .elasticsearchConverter .getMappingContext ().getPersistentEntities ()) {
270270 if (mappingEntry .getName ().equals (persistentEntity .getIndexCoordinates ().getIndexName ())) {
271- entity = persistentEntity . getType () ;
271+ entity = persistentEntity ;
272272
273273 break ;
274274 }
@@ -281,7 +281,7 @@ private void refreshEntitiesMapping() {
281281 if (mappingEntry .getMappings ().containsKey ("dynamic_templates" )) {
282282 Object dynamicTemplates = mappingEntry .getMappings ().get ("dynamic_templates" );
283283 if (dynamicTemplates instanceof List <?> value ) {
284- getRequiredPersistentEntity ( entity ) .buildDynamicTemplates (value );
284+ entity .buildDynamicTemplates (value );
285285 }
286286 }
287287 }
Original file line number Diff line number Diff line change @@ -961,7 +961,7 @@ private static class FieldAliasEntity {
961961 }
962962
963963 @ SuppressWarnings ("unused" )
964- @ Document (indexName = "foo" )
964+ @ Document (indexName = "#{@indexNameProvider.indexName()}- foo" )
965965 @ DynamicTemplates (mappingPath = "/mappings/test-dynamic_templates_mappings_three.json" )
966966 private static class DynamicFieldDocument {
967967 @ Nullable
You can’t perform that action at this time.
0 commit comments