Skip to content

Commit 233325f

Browse files
yrodiereSanne
authored andcommitted
HSEARCH-2219 Remove an unnecessary Elasticsearch mapping creation
The mappings are already created by a call to createMappings from ElasticsearchIndexManager. Before this patch, the mappings were created, and then updated with the exact same content.
1 parent 3cf8a93 commit 233325f

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

elasticsearch/src/main/java/org/hibernate/search/elasticsearch/schema/impl/DefaultElasticsearchSchemaCreator.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,6 @@ public void createIndex(IndexMetadata indexMetadata, ExecutionOptions executionO
5050
schemaAccessor.createIndex( indexName, indexMetadata.getSettings(), executionOptions );
5151

5252
schemaAccessor.waitForIndexStatus( indexName, executionOptions );
53-
54-
for ( Map.Entry<String, TypeMapping> entry : indexMetadata.getMappings().entrySet() ) {
55-
String mappingName = entry.getKey();
56-
TypeMapping mapping = entry.getValue();
57-
schemaAccessor.putMapping( indexName, mappingName, mapping );
58-
}
5953
}
6054

6155
@Override

0 commit comments

Comments
 (0)