Documentation for bulk errors.

Original Pull Request #1982 
Closes #1981
This commit is contained in:
Peter-Josef Meisch 2021-11-01 08:57:32 +01:00 committed by GitHub
parent bbee64c8a4
commit 5717d6ee57
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 2 deletions

View File

@ -164,6 +164,7 @@ public interface DocumentOperations {
* @param queries the queries to execute in bulk
* @param clazz the entity class
* @return the information about the indexed objects
* @throws org.springframework.data.elasticsearch.BulkFailureException with information about the failed operation
* @since 4.1
*/
default List<IndexedObjectInformation> bulkIndex(List<IndexQuery> queries, Class<?> clazz) {
@ -175,6 +176,7 @@ public interface DocumentOperations {
*
* @param queries the queries to execute in bulk
* @return the information about of the indexed objects
* @throws org.springframework.data.elasticsearch.BulkFailureException with information about the failed operation
*/
default List<IndexedObjectInformation> bulkIndex(List<IndexQuery> queries, IndexCoordinates index) {
return bulkIndex(queries, BulkOptions.defaultOptions(), index);
@ -187,6 +189,7 @@ public interface DocumentOperations {
* @param bulkOptions options to be added to the bulk request
* @param clazz the entity class
* @return the information about of the indexed objects
* @throws org.springframework.data.elasticsearch.BulkFailureException with information about the failed operation
* @since 4.1
*/
List<IndexedObjectInformation> bulkIndex(List<IndexQuery> queries, BulkOptions bulkOptions, Class<?> clazz);
@ -197,6 +200,7 @@ public interface DocumentOperations {
* @param queries the queries to execute in bulk
* @param bulkOptions options to be added to the bulk request
* @return the information about of the indexed objects
* @throws org.springframework.data.elasticsearch.BulkFailureException with information about the failed operation
*/
List<IndexedObjectInformation> bulkIndex(List<IndexQuery> queries, BulkOptions bulkOptions, IndexCoordinates index);
@ -204,6 +208,7 @@ public interface DocumentOperations {
* Bulk update all objects. Will do update.
*
* @param queries the queries to execute in bulk
* @throws org.springframework.data.elasticsearch.BulkFailureException with information about the failed operation
*/
default void bulkUpdate(List<UpdateQuery> queries, IndexCoordinates index) {
bulkUpdate(queries, BulkOptions.defaultOptions(), index);
@ -214,6 +219,7 @@ public interface DocumentOperations {
*
* @param clazz the entity class
* @param queries the queries to execute in bulk
* @throws org.springframework.data.elasticsearch.BulkFailureException with information about the failed operation
* @since 4.1
*/
void bulkUpdate(List<UpdateQuery> queries, Class<?> clazz);
@ -223,6 +229,7 @@ public interface DocumentOperations {
*
* @param queries the queries to execute in bulk
* @param bulkOptions options to be added to the bulk request
* @throws org.springframework.data.elasticsearch.BulkFailureException with information about the failed operation
*/
void bulkUpdate(List<UpdateQuery> queries, BulkOptions bulkOptions, IndexCoordinates index);

View File

@ -106,7 +106,8 @@ public interface ReactiveDocumentOperations {
/**
* Index entities in the given {@literal index}. If the {@literal index} is {@literal null} or empty the index name
* provided via entity metadata is used.
* provided via entity metadata is used. On errors returns with
* {@link org.springframework.data.elasticsearch.BulkFailureException} with information about the failed operation
*
* @param entities must not be {@literal null}.
* @param index the target index, must not be {@literal null}
@ -168,7 +169,8 @@ public interface ReactiveDocumentOperations {
<T> Flux<MultiGetItem<T>> multiGet(Query query, Class<T> clazz, IndexCoordinates index);
/**
* Bulk update all objects. Will do update.
* Bulk update all objects. Will do update. On errors returns with
* {@link org.springframework.data.elasticsearch.BulkFailureException} with information about the failed operation
*
* @param queries the queries to execute in bulk
* @since 4.0
@ -182,6 +184,7 @@ public interface ReactiveDocumentOperations {
*
* @param queries the queries to execute in bulk
* @param bulkOptions options to be added to the bulk request
* @throws org.springframework.data.elasticsearch.BulkFailureException with information about the failed operation
* @since 4.0
*/
Mono<Void> bulkUpdate(List<UpdateQuery> queries, BulkOptions bulkOptions, IndexCoordinates index);