18
18
*/
19
19
20
20
import { Dictionary } from '@spec_utils/Dictionary'
21
- import { Metadata } from '@_types/common'
22
- import { QueryContainer } from '@_types/query_dsl/abstractions'
21
+ import { SingleKeyDictionary } from '@spec_utils/Dictionary'
22
+ import { Metadata , Field } from '@_types/common'
23
+ import { BoolQuery } from '@_types/query_dsl/compound'
23
24
import {
25
+ ExistsQuery ,
26
+ IdsQuery ,
27
+ PrefixQuery ,
28
+ RangeQuery ,
29
+ TermQuery ,
30
+ TermsQuery ,
31
+ WildcardQuery
32
+ } from '@_types/query_dsl/term'
33
+ import { MatchQuery , SimpleQueryStringQuery } from '@_types/query_dsl/fulltext'
34
+ import { MatchAllQuery } from '@_types/query_dsl/MatchAllQuery'
35
+ import {
36
+ BucketAggregationBase ,
24
37
CompositeAggregation ,
25
38
DateRangeAggregation ,
26
- FiltersAggregation ,
27
39
MissingAggregation ,
28
40
RangeAggregation ,
29
41
TermsAggregation
@@ -33,6 +45,7 @@ import {
33
45
ValueCountAggregation
34
46
} from '@_types/aggregations/metric'
35
47
import {
48
+ Buckets ,
36
49
CardinalityAggregate ,
37
50
ValueCountAggregate ,
38
51
StringTermsAggregate ,
@@ -83,12 +96,12 @@ export class APIKeyAggregationContainer {
83
96
* A single bucket aggregation that narrows the set of documents to those that match a query.
84
97
* @doc_id search-aggregations-bucket-filter-aggregation
85
98
*/
86
- filter ?: QueryContainer
99
+ filter ?: APIKeyQueryContainer
87
100
/**
88
101
* A multi-bucket aggregation where each bucket contains the documents that match a query.
89
102
* @doc_id search-aggregations-bucket-filters-aggregation
90
103
*/
91
- filters ?: FiltersAggregation
104
+ filters ?: APIKeyFiltersAggregation
92
105
missing ?: MissingAggregation
93
106
/**
94
107
* A multi-bucket value source based aggregation that enables the user to define a set of ranges - each representing a bucket.
@@ -125,3 +138,91 @@ export type APIKeyAggregate =
125
138
| RangeAggregate
126
139
| DateRangeAggregate
127
140
| CompositeAggregate
141
+
142
+ /**
143
+ * @variants container
144
+ * @non_exhaustive
145
+ */
146
+ export class APIKeyQueryContainer {
147
+ /**
148
+ * matches documents matching boolean combinations of other queries.
149
+ * @doc_id query-dsl-bool-query
150
+ */
151
+ bool ?: BoolQuery
152
+ /**
153
+ * Returns documents that contain an indexed value for a field.
154
+ * @doc_id query-dsl-exists-query
155
+ */
156
+ exists ?: ExistsQuery
157
+ /**
158
+ * Returns documents based on their IDs.
159
+ * This query uses document IDs stored in the `_id` field.
160
+ * @doc_id query-dsl-ids-query
161
+ */
162
+ ids ?: IdsQuery
163
+ /**
164
+ * Returns documents that match a provided text, number, date or boolean value.
165
+ * The provided text is analyzed before matching.
166
+ * @doc_id query-dsl-match-query
167
+ */
168
+ match ?: SingleKeyDictionary < Field , MatchQuery >
169
+ /**
170
+ * Matches all documents, giving them all a `_score` of 1.0.
171
+ * @doc_id query-dsl-match-all-query
172
+ */
173
+ match_all ?: MatchAllQuery
174
+ /**
175
+ * Returns documents that contain a specific prefix in a provided field.
176
+ * @doc_id query-dsl-prefix-query
177
+ */
178
+ prefix ?: SingleKeyDictionary < Field , PrefixQuery >
179
+ /**
180
+ * Returns documents that contain terms within a provided range.
181
+ * @doc_id query-dsl-range-query
182
+ */
183
+ range ?: SingleKeyDictionary < Field , RangeQuery >
184
+ /**
185
+ * Returns documents based on a provided query string, using a parser with a limited but fault-tolerant syntax.
186
+ * @doc_id query-dsl-simple-query-string-query
187
+ */
188
+ simple_query_string ?: SimpleQueryStringQuery
189
+ /**
190
+ * Returns documents that contain an exact term in a provided field.
191
+ * To return a document, the query term must exactly match the queried field's value, including whitespace and capitalization.
192
+ * @doc_id query-dsl-term-query
193
+ */
194
+ term ?: SingleKeyDictionary < Field , TermQuery >
195
+ /**
196
+ * Returns documents that contain one or more exact terms in a provided field.
197
+ * To return a document, one or more terms must exactly match a field value, including whitespace and capitalization.
198
+ * @doc_id query-dsl-terms-query
199
+ */
200
+ terms ?: TermsQuery
201
+ /**
202
+ * Returns documents that contain terms matching a wildcard pattern.
203
+ * @doc_id query-dsl-wildcard-query
204
+ */
205
+ wildcard ?: SingleKeyDictionary < Field , WildcardQuery >
206
+ }
207
+
208
+ export class APIKeyFiltersAggregation extends BucketAggregationBase {
209
+ /**
210
+ * Collection of queries from which to build buckets.
211
+ */
212
+ filters ?: Buckets < APIKeyQueryContainer >
213
+ /**
214
+ * Set to `true` to add a bucket to the response which will contain all documents that do not match any of the given filters.
215
+ */
216
+ other_bucket ?: boolean
217
+ /**
218
+ * The key with which the other bucket is returned.
219
+ * @server_default _other_
220
+ */
221
+ other_bucket_key ?: string
222
+ /**
223
+ * By default, the named filters aggregation returns the buckets as an object.
224
+ * Set to `false` to return the buckets as an array of objects.
225
+ * @server_default true
226
+ */
227
+ keyed ?: boolean
228
+ }
0 commit comments