|
18 | 18 | */
|
19 | 19 |
|
20 | 20 | import { HitsMetadata } from '@global/search/_types/hits'
|
21 |
| -import { integer } from '@_types/Numeric' |
22 |
| -import { ShardStatistics } from '@_types/Stats' |
| 21 | +import { double, integer, long } from '@_types/Numeric' |
| 22 | +import { ClusterStatistics, ShardStatistics } from '@_types/Stats' |
| 23 | +import { Dictionary } from '@spec_utils/Dictionary' |
| 24 | +import { AggregateName, Id, ScrollId, SuggestionName } from '@_types/common' |
| 25 | +import { Aggregate } from '@_types/aggregations/Aggregate' |
| 26 | +import { UserDefinedValue } from '@spec_utils/UserDefinedValue' |
| 27 | +import { Profile } from '@global/search/_types/profile' |
| 28 | +import { Suggest } from '@global/search/_types/suggester' |
23 | 29 |
|
24 | 30 | export class Response<TDocument> {
|
25 | 31 | body: {
|
26 |
| - _shards: ShardStatistics |
| 32 | + // Has to be kept in sync with SearchResponse |
| 33 | + took: long |
27 | 34 | timed_out: boolean
|
28 |
| - took: integer |
| 35 | + _shards: ShardStatistics |
29 | 36 | hits: HitsMetadata<TDocument>
|
| 37 | + aggregations?: Dictionary<AggregateName, Aggregate> |
| 38 | + _clusters?: ClusterStatistics |
| 39 | + fields?: Dictionary<string, UserDefinedValue> |
| 40 | + max_score?: double |
| 41 | + num_reduce_phases?: long |
| 42 | + profile?: Profile |
| 43 | + pit_id?: Id |
| 44 | + _scroll_id?: ScrollId |
| 45 | + suggest?: Dictionary<SuggestionName, Suggest<TDocument>[]> |
| 46 | + terminated_early?: boolean |
30 | 47 | }
|
31 | 48 | }
|
0 commit comments