Package org.opensearch.data.client.orhlc
Class SearchDocumentResponseBuilder
java.lang.Object
org.opensearch.data.client.orhlc.SearchDocumentResponseBuilder
Factory class to create
SearchDocumentResponse instances.- Since:
- 0.1
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> org.springframework.data.elasticsearch.core.document.SearchDocumentResponsefrom(org.opensearch.action.search.SearchResponse searchResponse, org.springframework.data.elasticsearch.core.document.SearchDocumentResponse.EntityCreator<T> entityCreator) creates a SearchDocumentResponse from theSearchResponsestatic <T> org.springframework.data.elasticsearch.core.document.SearchDocumentResponsefrom(org.opensearch.search.SearchHits searchHits, org.springframework.data.elasticsearch.core.SearchShardStatistics shardStatistics, String scrollId, org.opensearch.search.aggregations.Aggregations aggregations, org.opensearch.search.suggest.Suggest suggestOS, org.springframework.data.elasticsearch.core.document.SearchDocumentResponse.EntityCreator<T> entityCreator) creates aSearchDocumentResponseBuilderfromSearchHitswith the given scrollId aggregations and suggest
-
Constructor Details
-
SearchDocumentResponseBuilder
public SearchDocumentResponseBuilder()
-
-
Method Details
-
from
public static <T> org.springframework.data.elasticsearch.core.document.SearchDocumentResponse from(org.opensearch.action.search.SearchResponse searchResponse, org.springframework.data.elasticsearch.core.document.SearchDocumentResponse.EntityCreator<T> entityCreator) creates a SearchDocumentResponse from theSearchResponse- Type Parameters:
T- entity type- Parameters:
searchResponse- must not be nullentityCreator- function to create an entity from aSearchDocument- Returns:
- the SearchDocumentResponse
-
from
public static <T> org.springframework.data.elasticsearch.core.document.SearchDocumentResponse from(org.opensearch.search.SearchHits searchHits, @Nullable org.springframework.data.elasticsearch.core.SearchShardStatistics shardStatistics, @Nullable String scrollId, @Nullable org.opensearch.search.aggregations.Aggregations aggregations, @Nullable org.opensearch.search.suggest.Suggest suggestOS, org.springframework.data.elasticsearch.core.document.SearchDocumentResponse.EntityCreator<T> entityCreator) creates aSearchDocumentResponseBuilderfromSearchHitswith the given scrollId aggregations and suggest- Type Parameters:
T- entity type- Parameters:
searchHits- theSearchHitsto processscrollId- scrollIdaggregations- aggregationssuggestOS- the suggestion response from OpenSearchentityCreator- function to create an entity from aSearchDocument- Returns:
- the
SearchDocumentResponse
-