Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[7.17] Allow single fields in fields and _source parameters #2332

Merged
merged 1 commit into from
Nov 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
111 changes: 84 additions & 27 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 @@ -95,7 +96,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>
/**
* Starting document offset. By default, you cannot page through more than 10,000
* hits using the from and size parameters. To page through more hits, use the
Expand Down Expand Up @@ -139,7 +140,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
7 changes: 5 additions & 2 deletions specification/_global/search/SearchRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,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>
/**
* Minimum _score for matching documents. Documents with a lower _score are
* not included in the search results.
Expand Down Expand Up @@ -183,7 +183,10 @@ 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.
*/
suggest?: Suggester
/**
* Maximum number of documents to collect for each shard. If a query reaches this
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
Loading