[[reference-rollup-rollup_search]]

////////
===========================================================================================================================
||                                                                                                                       ||
||                                                                                                                       ||
||                                                                                                                       ||
||        ██████╗ ███████╗ █████╗ ██████╗ ███╗   ███╗███████╗                                                            ||
||        ██╔══██╗██╔════╝██╔══██╗██╔══██╗████╗ ████║██╔════╝                                                            ||
||        ██████╔╝█████╗  ███████║██║  ██║██╔████╔██║█████╗                                                              ||
||        ██╔══██╗██╔══╝  ██╔══██║██║  ██║██║╚██╔╝██║██╔══╝                                                              ||
||        ██║  ██║███████╗██║  ██║██████╔╝██║ ╚═╝ ██║███████╗                                                            ||
||        ╚═╝  ╚═╝╚══════╝╚═╝  ╚═╝╚═════╝ ╚═╝     ╚═╝╚══════╝                                                            ||
||                                                                                                                       ||
||                                                                                                                       ||
||    This file is autogenerated, DO NOT send pull requests that changes this file directly.                             ||
||    You should update the script that does the generation, which can be found in:                                      ||
||    https://github.com/elastic/elastic-client-generator-js                                                             ||
||                                                                                                                       ||
||    You can run the script with the following command:                                                                 ||
||       npm run elasticsearch -- --version <version>                                                                    ||
||                                                                                                                       ||
||                                                                                                                       ||
||                                                                                                                       ||
===========================================================================================================================
////////

[discrete]
=== client.rollup.rollupSearch

Enables searching rolled-up data using the standard Query DSL.

{ref}/rollup-search.html[{es} documentation]

[discrete]
==== Function signature

[source,ts]
----
(RollupRollupSearchRequest, options?): Promise<RollupRollupSearchResponse>
----

[discrete]
===== `RollupRollupSearchRequest`

[source,ts]
----
interface RollupRollupSearchRequest extends <<shared-type-request-base, RequestBase>> {
  index: <<shared-type-indices, Indices>>
  rest_total_hits_as_int?: boolean
  typed_keys?: boolean
  aggregations?: Record<string, AggregationsAggregationContainer>
  /** @alias aggregations */
  aggs?: Record<string, AggregationsAggregationContainer>
  query?: QueryDslQueryContainer
  size?: <<shared-type-integer, integer>>
}
----

[discrete]
===== `RollupRollupSearchResponse`

[source,ts]
----
interface RollupRollupSearchResponse<TDocument = unknown, TAggregations = Record<<<shared-type-aggregate-name, AggregateName>>, AggregationsAggregate>> {
  took: <<shared-type-long, long>>
  timed_out: boolean
  terminated_early?: boolean
  _shards: <<shared-type-shard-statistics, ShardStatistics>>
  hits: SearchHitsMetadata<TDocument>
  aggregations?: TAggregations
}
----

