mirror of
https://github.com/spring-projects/spring-data-elasticsearch.git
synced 2025-06-01 09:42:11 +00:00
DATAES-909 - Polishing.
This commit is contained in:
parent
0208bffc0a
commit
a62e8af14f
@ -15,7 +15,6 @@
|
|||||||
*/
|
*/
|
||||||
package org.springframework.data.elasticsearch.core;
|
package org.springframework.data.elasticsearch.core;
|
||||||
|
|
||||||
import org.springframework.data.elasticsearch.core.query.UpdateResponse;
|
|
||||||
import reactor.core.publisher.Flux;
|
import reactor.core.publisher.Flux;
|
||||||
import reactor.core.publisher.Mono;
|
import reactor.core.publisher.Mono;
|
||||||
|
|
||||||
@ -27,6 +26,7 @@ import org.springframework.data.elasticsearch.core.mapping.IndexCoordinates;
|
|||||||
import org.springframework.data.elasticsearch.core.query.BulkOptions;
|
import org.springframework.data.elasticsearch.core.query.BulkOptions;
|
||||||
import org.springframework.data.elasticsearch.core.query.Query;
|
import org.springframework.data.elasticsearch.core.query.Query;
|
||||||
import org.springframework.data.elasticsearch.core.query.UpdateQuery;
|
import org.springframework.data.elasticsearch.core.query.UpdateQuery;
|
||||||
|
import org.springframework.data.elasticsearch.core.query.UpdateResponse;
|
||||||
import org.springframework.util.Assert;
|
import org.springframework.util.Assert;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -103,8 +103,8 @@ public interface ReactiveDocumentOperations {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Index entities in the given {@literal index}. If the {@literal index} is
|
* Index entities in the given {@literal index}. If the {@literal index} is {@literal null} or empty the index name
|
||||||
* {@literal null} or empty the index name provided via entity metadata is used.
|
* provided via entity metadata is used.
|
||||||
*
|
*
|
||||||
* @param entities must not be {@literal null}.
|
* @param entities must not be {@literal null}.
|
||||||
* @param index the target index, must not be {@literal null}
|
* @param index the target index, must not be {@literal null}
|
||||||
@ -129,8 +129,8 @@ public interface ReactiveDocumentOperations {
|
|||||||
<T> Flux<T> saveAll(Mono<? extends Collection<? extends T>> entities, Class<T> clazz);
|
<T> Flux<T> saveAll(Mono<? extends Collection<? extends T>> entities, Class<T> clazz);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Index entities in the given {@literal index}. If the {@literal index} is
|
* Index entities in the given {@literal index}. If the {@literal index} is {@literal null} or empty the index name
|
||||||
* {@literal null} or empty the index name provided via entity metadata is used.
|
* provided via entity metadata is used.
|
||||||
*
|
*
|
||||||
* @param entities must not be {@literal null}.
|
* @param entities must not be {@literal null}.
|
||||||
* @param index the target index, must not be {@literal null}
|
* @param index the target index, must not be {@literal null}
|
||||||
|
@ -528,6 +528,7 @@ public class ReactiveElasticsearchTemplate implements ReactiveElasticsearchOpera
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Mono<UpdateResponse> update(UpdateQuery updateQuery, IndexCoordinates index) {
|
public Mono<UpdateResponse> update(UpdateQuery updateQuery, IndexCoordinates index) {
|
||||||
|
|
||||||
Assert.notNull(updateQuery, "UpdateQuery must not be null");
|
Assert.notNull(updateQuery, "UpdateQuery must not be null");
|
||||||
Assert.notNull(index, "Index must not be null");
|
Assert.notNull(index, "Index must not be null");
|
||||||
|
|
||||||
|
@ -977,8 +977,8 @@ public class ReactiveElasticsearchTemplateTests {
|
|||||||
.as(StepVerifier::create) //
|
.as(StepVerifier::create) //
|
||||||
.expectNextMatches(foundEntity -> foundEntity.getMessage().equals("updated")) //
|
.expectNextMatches(foundEntity -> foundEntity.getMessage().equals("updated")) //
|
||||||
.verifyComplete();
|
.verifyComplete();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test // DATAES-908
|
@Test // DATAES-908
|
||||||
void shouldFillVersionOnSaveOne() {
|
void shouldFillVersionOnSaveOne() {
|
||||||
VersionedEntity saved = template.save(new VersionedEntity()).block();
|
VersionedEntity saved = template.save(new VersionedEntity()).block();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user