Skip to content

Commit 7856c72

Browse files
Polishing.
Update IndexOperations javadoc. Add missing parameters and change wording to reflect what the methods actually do. See: #4587
1 parent a3c67e3 commit 7856c72

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

Diff for: spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/index/IndexOperations.java

+4-2
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,15 @@ public interface IndexOperations {
3232
* class. If not it will be created.
3333
*
3434
* @param indexDefinition must not be {@literal null}.
35+
* @return the index name.
3536
*/
3637
String ensureIndex(IndexDefinition indexDefinition);
3738

3839
/**
39-
* Drops an index from this collection.
40+
* Alters the index with given {@literal name}.
4041
*
41-
* @param name name of index to hide.
42+
* @param name name of index to change.
43+
* @param options index options.
4244
* @since 4.1
4345
*/
4446
void alterIndex(String name, IndexOptions options);

Diff for: spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/index/ReactiveIndexOperations.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,15 @@ public interface ReactiveIndexOperations {
3232
* class. If not it will be created.
3333
*
3434
* @param indexDefinition must not be {@literal null}.
35+
* @return a {@link Mono} emitting the name of the index on completion.
3536
*/
3637
Mono<String> ensureIndex(IndexDefinition indexDefinition);
3738

3839
/**
3940
* Alters the index with given {@literal name}.
4041
*
41-
* @param name name of index to hide.
42-
* @param
42+
* @param name name of index to change.
43+
* @param options index options.
4344
* @since 4.1
4445
*/
4546
Mono<Void> alterIndex(String name, IndexOptions options);

0 commit comments

Comments
 (0)