mirror of
https://github.com/spring-projects/spring-data-elasticsearch.git
synced 2025-05-31 09:12:11 +00:00
DATAES-826 - Repositories should not try to create an index when it already exists.
original PR: #456
This commit is contained in:
parent
7540a2a1a8
commit
c7339dc248
@ -88,7 +88,7 @@ public abstract class AbstractElasticsearchRepository<T, ID> implements Elastics
|
||||
this.entityClass = this.entityInformation.getJavaType();
|
||||
this.indexOperations = operations.indexOps(this.entityClass);
|
||||
try {
|
||||
if (createIndexAndMapping()) {
|
||||
if (createIndexAndMapping() && !indexOperations.exists()) {
|
||||
createIndex();
|
||||
putMapping();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user