|
|
|
@ -36,19 +36,20 @@ public interface ReactiveIndexOperations { |
|
|
|
* @deprecated since 4.5, in favor of {@link #createIndex(IndexDefinition)}. |
|
|
|
* @deprecated since 4.5, in favor of {@link #createIndex(IndexDefinition)}. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@Deprecated(since = "4.5", forRemoval = true) |
|
|
|
@Deprecated(since = "4.5", forRemoval = true) |
|
|
|
Mono<String> ensureIndex(IndexDefinition indexDefinition); |
|
|
|
default Mono<String> ensureIndex(IndexDefinition indexDefinition) { |
|
|
|
|
|
|
|
return createIndex(indexDefinition); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Create the index for the provided {@link IndexDefinition} exists for the collection indicated by the entity class. |
|
|
|
* Create the index for the provided {@link IndexDefinition} for the collection indicated by the entity class. If the |
|
|
|
* If not it will be created. |
|
|
|
* index does not exist it will be created. Might error if the collection already defines an index with the same name |
|
|
|
|
|
|
|
* but different settings. |
|
|
|
* |
|
|
|
* |
|
|
|
* @param indexDefinition must not be {@literal null}. |
|
|
|
* @param indexDefinition must not be {@literal null}. |
|
|
|
* @return the index name. |
|
|
|
* @return the index name. |
|
|
|
* @since 4.5 |
|
|
|
* @since 4.5 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
default Mono<String> createIndex(IndexDefinition indexDefinition) { |
|
|
|
Mono<String> createIndex(IndexDefinition indexDefinition); |
|
|
|
return ensureIndex(indexDefinition); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Alters the index with given {@literal name}. |
|
|
|
* Alters the index with given {@literal name}. |
|
|
|
|