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