Skip to content

Commit 3893113

Browse files
authored
Revert "Allow single fields in fields and _source parameters (#2317)" (#2341)
This reverts commit 9f40be8.
1 parent e627f16 commit 3893113

File tree

6 files changed

+41
-129
lines changed

6 files changed

+41
-129
lines changed

output/openapi/elasticsearch-serverless-openapi.json

Lines changed: 4 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -26307,14 +26307,7 @@
2630726307
"description": "Array of wildcard (`*`) patterns.\nThe request returns doc values for field names matching these patterns in the `hits.fields` property of the response.",
2630826308
"type": "array",
2630926309
"items": {
26310-
"oneOf": [
26311-
{
26312-
"$ref": "#/components/schemas/_types:Field"
26313-
},
26314-
{
26315-
"$ref": "#/components/schemas/_types.query_dsl:FieldAndFormat"
26316-
}
26317-
]
26310+
"$ref": "#/components/schemas/_types.query_dsl:FieldAndFormat"
2631826311
}
2631926312
},
2632026313
"knn": {
@@ -26389,14 +26382,7 @@
2638926382
"description": "Array of wildcard (`*`) patterns.\nThe request returns values for field names matching these patterns in the `hits.fields` property of the response.",
2639026383
"type": "array",
2639126384
"items": {
26392-
"oneOf": [
26393-
{
26394-
"$ref": "#/components/schemas/_types.query_dsl:FieldAndFormat"
26395-
},
26396-
{
26397-
"$ref": "#/components/schemas/_types:Field"
26398-
}
26399-
]
26385+
"$ref": "#/components/schemas/_types.query_dsl:FieldAndFormat"
2640026386
}
2640126387
},
2640226388
"suggest": {
@@ -34082,9 +34068,6 @@
3408234068
{
3408334069
"type": "boolean"
3408434070
},
34085-
{
34086-
"$ref": "#/components/schemas/_types:Fields"
34087-
},
3408834071
{
3408934072
"$ref": "#/components/schemas/_global.search._types:SourceFilter"
3409034073
}
@@ -54996,14 +54979,7 @@
5499654979
"description": "Array of wildcard (*) patterns. The request returns doc values for field\nnames matching these patterns in the hits.fields property of the response.",
5499754980
"type": "array",
5499854981
"items": {
54999-
"oneOf": [
55000-
{
55001-
"$ref": "#/components/schemas/_types:Field"
55002-
},
55003-
{
55004-
"$ref": "#/components/schemas/_types.query_dsl:FieldAndFormat"
55005-
}
55006-
]
54982+
"$ref": "#/components/schemas/_types.query_dsl:FieldAndFormat"
5500754983
}
5500854984
},
5500954985
"knn": {
@@ -55084,14 +55060,7 @@
5508455060
"description": "Array of wildcard (*) patterns. The request returns values for field names\nmatching these patterns in the hits.fields property of the response.",
5508555061
"type": "array",
5508655062
"items": {
55087-
"oneOf": [
55088-
{
55089-
"$ref": "#/components/schemas/_types:Field"
55090-
},
55091-
{
55092-
"$ref": "#/components/schemas/_types.query_dsl:FieldAndFormat"
55093-
}
55094-
]
55063+
"$ref": "#/components/schemas/_types.query_dsl:FieldAndFormat"
5509555064
}
5509655065
},
5509755066
"terminate_after": {

output/schema/schema.json

Lines changed: 26 additions & 82 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/typescript/types.ts

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

specification/_global/msearch/types.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ import { Dictionary } from '@spec_utils/Dictionary'
2323
import { AggregationContainer } from '@_types/aggregations/AggregationContainer'
2424
import {
2525
ExpandWildcards,
26-
Field,
2726
Fields,
2827
IndexName,
2928
Indices,
@@ -97,7 +96,7 @@ export class MultisearchBody {
9796
* Array of wildcard (*) patterns. The request returns doc values for field
9897
* names matching these patterns in the hits.fields property of the response.
9998
*/
100-
docvalue_fields?: Array<Field | FieldAndFormat>
99+
docvalue_fields?: FieldAndFormat[]
101100
/**
102101
* Defines the approximate kNN search to run.
103102
* @availability stack since=8.4.0
@@ -147,7 +146,7 @@ export class MultisearchBody {
147146
* Array of wildcard (*) patterns. The request returns values for field names
148147
* matching these patterns in the hits.fields property of the response.
149148
*/
150-
fields?: Array<Field | FieldAndFormat>
149+
fields?: Array<FieldAndFormat>
151150
/**
152151
* Maximum number of documents to collect for each shard. If a query reaches this
153152
* limit, Elasticsearch terminates the query early. Elasticsearch collects documents

specification/_global/search/SearchRequest.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ export interface Request extends RequestBase {
371371
* Array of wildcard (`*`) patterns.
372372
* The request returns doc values for field names matching these patterns in the `hits.fields` property of the response.
373373
*/
374-
docvalue_fields?: Array<Field | FieldAndFormat>
374+
docvalue_fields?: FieldAndFormat[]
375375
/**
376376
* Defines the approximate kNN search to run.
377377
* @availability stack since=8.4.0
@@ -442,7 +442,7 @@ export interface Request extends RequestBase {
442442
* Array of wildcard (`*`) patterns.
443443
* The request returns values for field names matching these patterns in the `hits.fields` property of the response.
444444
*/
445-
fields?: Array<FieldAndFormat | Field>
445+
fields?: Array<FieldAndFormat>
446446
/**
447447
* Defines a suggester that provides similar looking terms based on a provided text.
448448
*/

specification/_global/search/_types/SourceFilter.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ export class SourceFilter {
3232

3333
/**
3434
* Defines how to fetch a source. Fetching can be disabled entirely, or the source can be filtered.
35-
* @codegen_names fetch, fields, filter
35+
* @codegen_names fetch, filter
3636
*/
37-
export type SourceConfig = boolean | Fields | SourceFilter
37+
export type SourceConfig = boolean | SourceFilter
3838

3939
/**
4040
* Defines how to fetch a source. Fetching can be disabled entirely, or the source can be filtered.

0 commit comments

Comments
 (0)