Class SearchResponse<TDocument>
java.lang.Object
co.elastic.clients.elasticsearch.core.SearchResponse<TDocument>
- All Implemented Interfaces:
JsonpSerializable
- Direct Known Subclasses:
MultiSearchItem,ScrollResponse
@JsonpDeserializable public class SearchResponse<TDocument> extends java.lang.Object implements JsonpSerializable
- See Also:
- API specification
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classSearchResponse.AbstractBuilder<TDocument,BuilderT extends SearchResponse.AbstractBuilder<TDocument,BuilderT>>static classSearchResponse.Builder<TDocument>Builder forSearchResponse. -
Field Summary
Fields Modifier and Type Field Description static JsonpDeserializer<SearchResponse<java.lang.Object>>_DESERIALIZERJson deserializer forSearchResponsebased on named deserializers provided by the callingJsonMapper. -
Constructor Summary
Constructors Modifier Constructor Description protectedSearchResponse(SearchResponse.AbstractBuilder<TDocument,?> builder) -
Method Summary
Modifier and Type Method Description java.util.Map<java.lang.String,Aggregate>aggregations()API name:aggregationsClusterStatisticsclusters()API name:_clustersstatic <TDocument>
JsonpDeserializer<SearchResponse<TDocument>>createSearchResponseDeserializer(JsonpDeserializer<TDocument> tDocumentDeserializer)Create a JSON deserializer for SearchResponsejava.util.List<TDocument>documents()API name:documentsjava.util.Map<java.lang.String,JsonData>fields()API name:fieldsHitsMetadata<TDocument>hits()Required - API name:hitsjava.lang.DoublemaxScore()API name:max_scorejava.lang.LongnumReducePhases()API name:num_reduce_phasesjava.lang.StringpitId()API name:pit_idProfileprofile()API name:profilejava.lang.StringscrollId()API name:_scroll_idstatic <TDocument>
SearchResponse<TDocument>searchResponseOf(java.util.function.Function<SearchResponse.Builder<TDocument>,ObjectBuilder<SearchResponse<TDocument>>> fn)voidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)Serialize this object to JSON.protected voidserializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)protected static <TDocument, BuilderT extends SearchResponse.AbstractBuilder<TDocument, BuilderT>>
voidsetupSearchResponseDeserializer(ObjectDeserializer<BuilderT> op, JsonpDeserializer<TDocument> tDocumentDeserializer)ShardStatisticsshards()Required - API name:_shardsjava.util.Map<java.lang.String,java.util.List<Suggestion<TDocument>>>suggest()API name:suggestjava.lang.BooleanterminatedEarly()API name:terminated_earlybooleantimedOut()Required - API name:timed_outlongtook()Required - API name:tookMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
_DESERIALIZER
Json deserializer forSearchResponsebased on named deserializers provided by the callingJsonMapper.
-
-
Constructor Details
-
SearchResponse
-
-
Method Details
-
searchResponseOf
public static <TDocument> SearchResponse<TDocument> searchResponseOf(java.util.function.Function<SearchResponse.Builder<TDocument>,ObjectBuilder<SearchResponse<TDocument>>> fn) -
took
public final long took()Required - API name:took -
timedOut
public final boolean timedOut()Required - API name:timed_out -
shards
Required - API name:_shards -
hits
Required - API name:hits -
aggregations
API name:aggregations -
clusters
API name:_clusters -
documents
API name:documents -
fields
API name:fields -
maxScore
@Nullable public final java.lang.Double maxScore()API name:max_score -
numReducePhases
@Nullable public final java.lang.Long numReducePhases()API name:num_reduce_phases -
profile
API name:profile -
pitId
@Nullable public final java.lang.String pitId()API name:pit_id -
scrollId
@Nullable public final java.lang.String scrollId()API name:_scroll_id -
suggest
API name:suggest -
terminatedEarly
@Nullable public final java.lang.Boolean terminatedEarly()API name:terminated_early -
serialize
Serialize this object to JSON.- Specified by:
serializein interfaceJsonpSerializable
-
serializeInternal
-
createSearchResponseDeserializer
public static <TDocument> JsonpDeserializer<SearchResponse<TDocument>> createSearchResponseDeserializer(JsonpDeserializer<TDocument> tDocumentDeserializer)Create a JSON deserializer for SearchResponse -
setupSearchResponseDeserializer
protected static <TDocument, BuilderT extends SearchResponse.AbstractBuilder<TDocument, BuilderT>> void setupSearchResponseDeserializer(ObjectDeserializer<BuilderT> op, JsonpDeserializer<TDocument> tDocumentDeserializer)
-