Skip to content

Commit

Permalink
Merge branch 'main' into inference-spec
Browse files Browse the repository at this point in the history
  • Loading branch information
davidkyle authored Nov 6, 2023
2 parents 513f1df + 9f40be8 commit 4509e97
Show file tree
Hide file tree
Showing 6 changed files with 129 additions and 41 deletions.
39 changes: 35 additions & 4 deletions output/openapi/elasticsearch-serverless-openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -26324,7 +26324,14 @@
"description": "Array of wildcard (`*`) patterns.\nThe request returns doc values for field names matching these patterns in the `hits.fields` property of the response.",
"type": "array",
"items": {
"$ref": "#/components/schemas/_types.query_dsl:FieldAndFormat"
"oneOf": [
{
"$ref": "#/components/schemas/_types:Field"
},
{
"$ref": "#/components/schemas/_types.query_dsl:FieldAndFormat"
}
]
}
},
"knn": {
Expand Down Expand Up @@ -26399,7 +26406,14 @@
"description": "Array of wildcard (`*`) patterns.\nThe request returns values for field names matching these patterns in the `hits.fields` property of the response.",
"type": "array",
"items": {
"$ref": "#/components/schemas/_types.query_dsl:FieldAndFormat"
"oneOf": [
{
"$ref": "#/components/schemas/_types.query_dsl:FieldAndFormat"
},
{
"$ref": "#/components/schemas/_types:Field"
}
]
}
},
"suggest": {
Expand Down Expand Up @@ -34085,6 +34099,9 @@
{
"type": "boolean"
},
{
"$ref": "#/components/schemas/_types:Fields"
},
{
"$ref": "#/components/schemas/_global.search._types:SourceFilter"
}
Expand Down Expand Up @@ -54996,7 +55013,14 @@
"description": "Array of wildcard (*) patterns. The request returns doc values for field\nnames matching these patterns in the hits.fields property of the response.",
"type": "array",
"items": {
"$ref": "#/components/schemas/_types.query_dsl:FieldAndFormat"
"oneOf": [
{
"$ref": "#/components/schemas/_types:Field"
},
{
"$ref": "#/components/schemas/_types.query_dsl:FieldAndFormat"
}
]
}
},
"knn": {
Expand Down Expand Up @@ -55077,7 +55101,14 @@
"description": "Array of wildcard (*) patterns. The request returns values for field names\nmatching these patterns in the hits.fields property of the response.",
"type": "array",
"items": {
"$ref": "#/components/schemas/_types.query_dsl:FieldAndFormat"
"oneOf": [
{
"$ref": "#/components/schemas/_types:Field"
},
{
"$ref": "#/components/schemas/_types.query_dsl:FieldAndFormat"
}
]
}
},
"terminate_after": {
Expand Down
108 changes: 82 additions & 26 deletions output/schema/schema.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions output/typescript/types.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions specification/_global/msearch/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import { Dictionary } from '@spec_utils/Dictionary'
import { AggregationContainer } from '@_types/aggregations/AggregationContainer'
import {
ExpandWildcards,
Field,
Fields,
IndexName,
Indices,
Expand Down Expand Up @@ -96,7 +97,7 @@ export class MultisearchBody {
* Array of wildcard (*) patterns. The request returns doc values for field
* names matching these patterns in the hits.fields property of the response.
*/
docvalue_fields?: FieldAndFormat[]
docvalue_fields?: Array<Field | FieldAndFormat>
/**
* Defines the approximate kNN search to run.
* @availability stack since=8.4.0
Expand Down Expand Up @@ -146,7 +147,7 @@ export class MultisearchBody {
* Array of wildcard (*) patterns. The request returns values for field names
* matching these patterns in the hits.fields property of the response.
*/
fields?: Array<FieldAndFormat>
fields?: Array<Field | FieldAndFormat>
/**
* Maximum number of documents to collect for each shard. If a query reaches this
* limit, Elasticsearch terminates the query early. Elasticsearch collects documents
Expand Down
4 changes: 2 additions & 2 deletions specification/_global/search/SearchRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ export interface Request extends RequestBase {
* Array of wildcard (`*`) patterns.
* The request returns doc values for field names matching these patterns in the `hits.fields` property of the response.
*/
docvalue_fields?: FieldAndFormat[]
docvalue_fields?: Array<Field | FieldAndFormat>
/**
* Defines the approximate kNN search to run.
* @availability stack since=8.4.0
Expand Down Expand Up @@ -442,7 +442,7 @@ export interface Request extends RequestBase {
* Array of wildcard (`*`) patterns.
* The request returns values for field names matching these patterns in the `hits.fields` property of the response.
*/
fields?: Array<FieldAndFormat>
fields?: Array<FieldAndFormat | Field>
/**
* Defines a suggester that provides similar looking terms based on a provided text.
*/
Expand Down
4 changes: 2 additions & 2 deletions specification/_global/search/_types/SourceFilter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ export class SourceFilter {

/**
* Defines how to fetch a source. Fetching can be disabled entirely, or the source can be filtered.
* @codegen_names fetch, filter
* @codegen_names fetch, fields, filter
*/
export type SourceConfig = boolean | SourceFilter
export type SourceConfig = boolean | Fields | SourceFilter

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

0 comments on commit 4509e97

Please sign in to comment.