mirror of
https://github.com/spring-projects/spring-data-elasticsearch.git
synced 2025-06-30 15:52:12 +00:00
Polishing
This commit is contained in:
parent
b0c2ce3084
commit
cf9b106c31
@ -652,9 +652,8 @@ public class ElasticsearchTemplate extends AbstractElasticsearchTemplate {
|
||||
failedDocuments);
|
||||
}
|
||||
|
||||
return bulkResponse.items().stream()
|
||||
.map(item -> new IndexedObjectInformation(item.id(), item.index(), item.seqNo(), item.primaryTerm(),
|
||||
item.version()))
|
||||
return bulkResponse.items().stream().map(
|
||||
item -> new IndexedObjectInformation(item.id(), item.index(), item.seqNo(), item.primaryTerm(), item.version()))
|
||||
.collect(Collectors.toList());
|
||||
|
||||
}
|
||||
|
@ -381,8 +381,7 @@ public class ElasticsearchRestTemplate extends AbstractElasticsearchTemplate {
|
||||
response.getPrimaryTerm(), //
|
||||
response.getVersion());
|
||||
} else {
|
||||
return new IndexedObjectInformation(bulkItemResponse.getId(), bulkItemResponse.getIndex(), null, null,
|
||||
null);
|
||||
return new IndexedObjectInformation(bulkItemResponse.getId(), bulkItemResponse.getIndex(), null, null, null);
|
||||
}
|
||||
|
||||
}).collect(Collectors.toList());
|
||||
|
@ -140,8 +140,10 @@ public interface SearchOperations {
|
||||
* @param classes the entity classes used for property mapping
|
||||
* @param indexes the indexes to run the queries against
|
||||
* @return list of SearchHits
|
||||
* @since 5.1
|
||||
*/
|
||||
List<SearchHits<?>> multiSearch(List<? extends Query> queries, List<Class<?>> classes, List<IndexCoordinates> indexes);
|
||||
List<SearchHits<?>> multiSearch(List<? extends Query> queries, List<Class<?>> classes,
|
||||
List<IndexCoordinates> indexes);
|
||||
|
||||
/**
|
||||
* Execute the criteria query against elasticsearch and return result as {@link SearchHits}
|
||||
@ -240,6 +242,7 @@ public interface SearchOperations {
|
||||
default String openPointInTime(IndexCoordinates index, Duration keepAlive) {
|
||||
return openPointInTime(index, keepAlive, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Opens a point in time (pit) in Elasticsearch.
|
||||
*
|
||||
|
@ -29,16 +29,7 @@ import java.lang.Double;
|
||||
import java.lang.Integer;
|
||||
import java.lang.Long;
|
||||
import java.lang.Object;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.UUID;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.IntStream;
|
||||
|
||||
@ -1784,8 +1775,7 @@ public abstract class ElasticsearchIntegrationTests {
|
||||
|
||||
List<SearchHits<?>> searchHitsList = operations.multiSearch(queries,
|
||||
Lists.newArrayList(SampleEntity.class, Book.class),
|
||||
List.of(IndexCoordinates.of(indexNameProvider.indexName()),
|
||||
IndexCoordinates.of(bookIndex.getIndexName())));
|
||||
List.of(IndexCoordinates.of(indexNameProvider.indexName()), IndexCoordinates.of(bookIndex.getIndexName())));
|
||||
|
||||
bookIndexOperations.delete();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user