diff --git a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/index/IndexOperations.java b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/index/IndexOperations.java index 3af895cf94..a191e6fc04 100644 --- a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/index/IndexOperations.java +++ b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/index/IndexOperations.java @@ -32,13 +32,15 @@ public interface IndexOperations { * class. If not it will be created. * * @param indexDefinition must not be {@literal null}. + * @return the index name. */ String ensureIndex(IndexDefinition indexDefinition); /** - * Drops an index from this collection. + * Alters the index with given {@literal name}. * - * @param name name of index to hide. + * @param name name of index to change. + * @param options index options. * @since 4.1 */ void alterIndex(String name, IndexOptions options); diff --git a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/index/ReactiveIndexOperations.java b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/index/ReactiveIndexOperations.java index e0a02ffe20..543d91f527 100644 --- a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/index/ReactiveIndexOperations.java +++ b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/index/ReactiveIndexOperations.java @@ -32,14 +32,15 @@ public interface ReactiveIndexOperations { * class. If not it will be created. * * @param indexDefinition must not be {@literal null}. + * @return a {@link Mono} emitting the name of the index on completion. */ Mono ensureIndex(IndexDefinition indexDefinition); /** * Alters the index with given {@literal name}. * - * @param name name of index to hide. - * @param + * @param name name of index to change. + * @param options index options. * @since 4.1 */ Mono alterIndex(String name, IndexOptions options);