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
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -265,10 +265,10 @@ private void refreshEntitiesMapping() {
265
265
ClusterMapping clusterMapping = getClusterMapping ();
266
266
for (ClusterMapping .ClusterMappingEntry mappingEntry : clusterMapping ) {
267
267
// Get entity
268
- Class <?> entity = null ;
268
+ ElasticsearchPersistentEntity <?> entity = null ;
269
269
for (ElasticsearchPersistentEntity <?> persistentEntity : this .elasticsearchConverter .getMappingContext ().getPersistentEntities ()) {
270
270
if (mappingEntry .getName ().equals (persistentEntity .getIndexCoordinates ().getIndexName ())) {
271
- entity = persistentEntity . getType () ;
271
+ entity = persistentEntity ;
272
272
273
273
break ;
274
274
}
@@ -281,7 +281,7 @@ private void refreshEntitiesMapping() {
281
281
if (mappingEntry .getMappings ().containsKey ("dynamic_templates" )) {
282
282
Object dynamicTemplates = mappingEntry .getMappings ().get ("dynamic_templates" );
283
283
if (dynamicTemplates instanceof List <?> value ) {
284
- getRequiredPersistentEntity ( entity ) .buildDynamicTemplates (value );
284
+ entity .buildDynamicTemplates (value );
285
285
}
286
286
}
287
287
}
Original file line number Diff line number Diff line change @@ -961,7 +961,7 @@ private static class FieldAliasEntity {
961
961
}
962
962
963
963
@ SuppressWarnings ("unused" )
964
- @ Document (indexName = "foo" )
964
+ @ Document (indexName = "#{@indexNameProvider.indexName()}- foo" )
965
965
@ DynamicTemplates (mappingPath = "/mappings/test-dynamic_templates_mappings_three.json" )
966
966
private static class DynamicFieldDocument {
967
967
@ Nullable
You can’t perform that action at this time.
0 commit comments