diff --git a/core/src/main/java/org/biacode/escommons/core/component/IndexingComponent.java b/core/src/main/java/org/biacode/escommons/core/component/IndexingComponent.java index a6daab1..713ddd3 100644 --- a/core/src/main/java/org/biacode/escommons/core/component/IndexingComponent.java +++ b/core/src/main/java/org/biacode/escommons/core/component/IndexingComponent.java @@ -1,6 +1,7 @@ package org.biacode.escommons.core.component; import javax.annotation.Nonnull; +import javax.annotation.Nullable; import java.util.List; import java.util.Map; @@ -22,7 +23,7 @@ public interface IndexingComponent { * @return new generated index name */ @Nonnull - String createIndexAndSetupMappings(@Nonnull final String originalIndex, @Nonnull final List types, final Map settings); + String createIndexAndSetupMappings(@Nonnull final String originalIndex, @Nonnull final List types, @Nullable final Map settings); /** * Creates alias with originalIndex's name which points to newIndex diff --git a/core/src/main/java/org/biacode/escommons/core/component/impl/IndexingComponentImpl.java b/core/src/main/java/org/biacode/escommons/core/component/impl/IndexingComponentImpl.java index dd81528..f811725 100644 --- a/core/src/main/java/org/biacode/escommons/core/component/impl/IndexingComponentImpl.java +++ b/core/src/main/java/org/biacode/escommons/core/component/impl/IndexingComponentImpl.java @@ -11,6 +11,7 @@ import org.springframework.util.Assert; import javax.annotation.Nonnull; +import javax.annotation.Nullable; import java.util.List; import java.util.Map; @@ -44,7 +45,9 @@ public IndexingComponentImpl() { //region Public methods @Nonnull @Override - public String createIndexAndSetupMappings(@Nonnull final String originalIndex, @Nonnull final List types, final Map settings) { + public String createIndexAndSetupMappings(@Nonnull final String originalIndex, + @Nonnull final List types, + @Nullable final Map settings) { assertOriginalIndexNotNull(originalIndex); Assert.notNull(types, "The list of types should not be null"); final String newIndexName = indexNameGenerationComponent.generateNameForGivenIndex(originalIndex);