Class RollupSearchRequest
- All Implemented Interfaces:
JsonpSerializable
The request body supports a subset of features from the regular search API. The following functionality is not available:
size
: Because rollups work on pre-aggregated data, no search
hits can be returned and so size must be set to zero or omitted entirely.
highlighter
, suggestors
, post_filter
,
profile
, explain
: These are similarly disallowed.
Searching both historical rollup and non-rollup data
The rollup search API has the capability to search across both "live" non-rollup data and the aggregated rollup data. This is done by simply adding the live indices to the URI. For example:
GET sensor-1,sensor_rollup/_rollup_search
{
"size": 0,
"aggregations": {
"max_temperature": {
"max": {
"field": "temperature"
}
}
}
}
The rollup search endpoint does two things when the search runs:
- The original request is sent to the non-rollup index unaltered.
- A rewritten version of the original request is sent to the rollup index.
When the two responses are received, the endpoint rewrites the rollup response and merges the two together. During the merging process, if there is any overlap in buckets between the two responses, the buckets from the non-rollup index are used.
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class co.elastic.clients.elasticsearch._types.RequestBase
RequestBase.AbstractBuilder<BuilderT extends RequestBase.AbstractBuilder<BuilderT>>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final JsonpDeserializer<RollupSearchRequest>
Deprecated.Json deserializer forRollupSearchRequest
static final SimpleEndpoint<RollupSearchRequest,
?> Deprecated.Endpoint "rollup.rollup_search
". -
Method Summary
Modifier and TypeMethodDescriptionfinal Map<String,
Aggregation> Deprecated.Specifies aggregations.static <TDocument>
Endpoint<RollupSearchRequest,RollupSearchResponse<TDocument>, ErrorResponse> createRollupSearchEndpoint
(JsonpDeserializer<TDocument> tDocumentDeserializer) Deprecated.Create an "rollup.rollup_search
" endpoint.index()
Deprecated.Required - A comma-separated list of data streams and indices used to limit the request.static RollupSearchRequest
Deprecated.final Query
query()
Deprecated.Specifies a DSL query that is subject to some limitations.void
serialize
(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) Deprecated.Serialize this object to JSON.protected void
serializeInternal
(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) Deprecated.protected static void
Deprecated.final Integer
size()
Deprecated.Must be zero if set, as rollups work on pre-aggregated data.Methods inherited from class co.elastic.clients.elasticsearch._types.RequestBase
toString
-
Field Details
-
_DESERIALIZER
Deprecated.Json deserializer forRollupSearchRequest
-
_ENDPOINT
Deprecated.Endpoint "rollup.rollup_search
".
-
-
Method Details
-
of
public static RollupSearchRequest of(Function<RollupSearchRequest.Builder, ObjectBuilder<RollupSearchRequest>> fn) Deprecated. -
aggregations
Deprecated.Specifies aggregations.API name:
aggregations
-
index
Deprecated.Required - A comma-separated list of data streams and indices used to limit the request. This parameter has the following rules:- At least one data stream, index, or wildcard expression must be
specified. This target can include a rollup or non-rollup index. For data
streams, the stream's backing indices can only serve as non-rollup indices.
Omitting the parameter or using
_all
are not permitted. - Multiple non-rollup indices may be specified.
- Only one rollup index may be specified. If more than one are supplied, an exception occurs.
- Wildcard expressions (
*
) may be used. If they match more than one rollup index, an exception occurs. However, you can use an expression to match multiple non-rollup indices or data streams.
API name:
index
- At least one data stream, index, or wildcard expression must be
specified. This target can include a rollup or non-rollup index. For data
streams, the stream's backing indices can only serve as non-rollup indices.
Omitting the parameter or using
-
query
Deprecated.Specifies a DSL query that is subject to some limitations.API name:
query
-
size
Deprecated.Must be zero if set, as rollups work on pre-aggregated data.API name:
size
-
serialize
Deprecated.Serialize this object to JSON.- Specified by:
serialize
in interfaceJsonpSerializable
-
serializeInternal
Deprecated. -
setupRollupSearchRequestDeserializer
protected static void setupRollupSearchRequestDeserializer(ObjectDeserializer<RollupSearchRequest.Builder> op) Deprecated. -
createRollupSearchEndpoint
public static <TDocument> Endpoint<RollupSearchRequest,RollupSearchResponse<TDocument>, createRollupSearchEndpointErrorResponse> (JsonpDeserializer<TDocument> tDocumentDeserializer) Deprecated.Create an "rollup.rollup_search
" endpoint.
-