Class SearchHitSupport
java.lang.Object
org.springframework.data.elasticsearch.core.SearchHitSupport
Utility class with helper methods for working with
SearchHit
.- Since:
- 4.0
- Author:
- Peter-Josef Meisch, Sascha Woo, Roman Puchkovskiy
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> SearchPage<T>
searchPageFor
(SearchHits<T> searchHits, Pageable pageable) static Object
unwrapSearchHits
(Object result) unwraps the data contained in a SearchHit for different types containing SearchHits if possible
-
Method Details
-
unwrapSearchHits
unwraps the data contained in a SearchHit for different types containing SearchHits if possible- Parameters:
result
- the object, list, page or whatever containing SearchHit objects- Returns:
- a corresponding object where the SearchHits are replaced by their content if possible, otherwise the original object
-
searchPageFor
public static <T> SearchPage<T> searchPageFor(SearchHits<T> searchHits, @Nullable Pageable pageable)
-