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