public class SearchDocumentResponse extends Object
from(SearchResponse, EntityCreator) method.| Modifier and Type | Class and Description |
|---|---|
static interface |
SearchDocumentResponse.EntityCreator<T>
A function to convert a
SearchDocument async into an entity. |
| Modifier and Type | Method and Description |
|---|---|
static <T> SearchDocumentResponse |
from(org.elasticsearch.search.SearchHits searchHits,
String scrollId,
org.elasticsearch.search.aggregations.Aggregations aggregations,
org.elasticsearch.search.suggest.Suggest suggestES,
SearchDocumentResponse.EntityCreator<T> entityCreator)
creates a
SearchDocumentResponse from SearchHits with the given scrollId aggregations and suggest |
static <T> SearchDocumentResponse |
from(org.elasticsearch.action.search.SearchResponse searchResponse,
SearchDocumentResponse.EntityCreator<T> entityCreator)
creates a SearchDocumentResponse from the
SearchResponse |
AggregationsContainer<?> |
getAggregations() |
float |
getMaxScore() |
String |
getScrollId() |
List<SearchDocument> |
getSearchDocuments() |
Suggest |
getSuggest() |
long |
getTotalHits() |
String |
getTotalHitsRelation() |
public long getTotalHits()
public String getTotalHitsRelation()
public float getMaxScore()
public String getScrollId()
public List<SearchDocument> getSearchDocuments()
@Nullable public AggregationsContainer<?> getAggregations()
public static <T> SearchDocumentResponse from(org.elasticsearch.action.search.SearchResponse searchResponse, SearchDocumentResponse.EntityCreator<T> entityCreator)
SearchResponseT - entity typesearchResponse - must not be nullentityCreator - function to create an entity from a SearchDocumentpublic static <T> SearchDocumentResponse from(org.elasticsearch.search.SearchHits searchHits, @Nullable String scrollId, @Nullable org.elasticsearch.search.aggregations.Aggregations aggregations, @Nullable org.elasticsearch.search.suggest.Suggest suggestES, SearchDocumentResponse.EntityCreator<T> entityCreator)
SearchDocumentResponse from SearchHits with the given scrollId aggregations and suggestT - entity typesearchHits - the SearchHits to processscrollId - scrollIdaggregations - aggregationssuggestES - the suggestion response from ElasticsearchentityCreator - function to create an entity from a SearchDocumentSearchDocumentResponseCopyright © 2011–2022 Pivotal Software, Inc.. All rights reserved.