Skip to content

[Backport 8.4] Fix optional/missing fields reported via Java client issues #1826

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

Merged
merged 1 commit into from
Aug 25, 2022
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
239 changes: 150 additions & 89 deletions output/schema/schema.json

Large diffs are not rendered by default.

38 changes: 21 additions & 17 deletions output/typescript/types.ts

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

5 changes: 5 additions & 0 deletions specification/_global/msearch/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ import { RuntimeFields } from '@_types/mapping/RuntimeFields'
import { ScriptField } from '@_types/Scripting'
import { SlicedScroll } from '@_types/SlicedScroll'
import { KnnQuery } from '@_types/Knn'
import { UserDefinedValue } from '@spec_utils/UserDefinedValue'

/**
* @codegen_names header, body
Expand Down Expand Up @@ -80,6 +81,10 @@ export class MultisearchBody {
* @server_default false
*/
explain?: boolean
/**
* Configuration of search extensions defined by Elasticsearch plugins.
*/
ext?: Dictionary<string, UserDefinedValue>
/**
* List of stored fields to return as part of a hit. If no fields are specified,
* no stored fields are included in the response. If this field is specified, the _source
Expand Down
5 changes: 5 additions & 0 deletions specification/_global/search/SearchRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ import { TrackHits } from '@global/search/_types/hits'
import { Operator } from '@_types/query_dsl/Operator'
import { Sort, SortResults } from '@_types/sort'
import { KnnQuery } from '@_types/Knn'
import { UserDefinedValue } from '@spec_utils/UserDefinedValue'

/**
* @rest_spec_name search
Expand Down Expand Up @@ -118,6 +119,10 @@ export interface Request extends RequestBase {
* @server_default false
*/
explain?: boolean
/**
* Configuration of search extensions defined by Elasticsearch plugins.
*/
ext?: Dictionary<string, UserDefinedValue>
/**
* 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
2 changes: 1 addition & 1 deletion specification/_types/Errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export class ErrorCause
/**
* A human-readable explanation of the error, in english
*/
reason: string
reason?: string
/**
* The server stack trace. Present only if the `error_trace=true` parameter was sent with the request.
*/
Expand Down
2 changes: 1 addition & 1 deletion specification/_types/aggregations/Aggregate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ export class ExtendedStatsBucketAggregate extends ExtendedStatsAggregate {}

/** @variant name=geo_bounds */
export class GeoBoundsAggregate extends AggregateBase {
bounds: GeoBounds
bounds?: GeoBounds
}

/** @variant name=geo_centroid */
Expand Down
21 changes: 11 additions & 10 deletions specification/_types/analysis/icu-plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,18 @@ export class IcuFoldingTokenFilter extends TokenFilterBase {

export class IcuCollationTokenFilter extends TokenFilterBase {
type: 'icu_collation'
alternate: IcuCollationAlternate
caseFirst: IcuCollationCaseFirst
caseLevel: boolean
country: string
decomposition: IcuCollationDecomposition
hiraganaQuaternaryMode: boolean
language: string
numeric: boolean
strength: IcuCollationStrength
alternate?: IcuCollationAlternate
caseFirst?: IcuCollationCaseFirst
caseLevel?: boolean
country?: string
decomposition?: IcuCollationDecomposition
hiraganaQuaternaryMode?: boolean
language?: string
numeric?: boolean
rules?: string
strength?: IcuCollationStrength
variableTop?: string
variant: string
variant?: string
}

export class IcuAnalyzer {
Expand Down
2 changes: 1 addition & 1 deletion specification/_types/mapping/RuntimeFields.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { Dictionary } from '@spec_utils/Dictionary'
import { Field } from '@_types/common'
import { Script } from '@_types/Scripting'

export type RuntimeFields = Dictionary<Field, RuntimeField | RuntimeField[]>
export type RuntimeFields = Dictionary<Field, RuntimeField>

export class RuntimeField {
format?: string
Expand Down
5 changes: 5 additions & 0 deletions specification/async_search/submit/AsyncSearchSubmitRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ import { Suggester } from '@global/search/_types/suggester'
import { TrackHits } from '@global/search/_types/hits'
import { Operator } from '@_types/query_dsl/Operator'
import { KnnQuery } from '@_types/Knn'
import { UserDefinedValue } from '@spec_utils/UserDefinedValue'

/**
* @rest_spec_name async_search.submit
Expand Down Expand Up @@ -128,6 +129,10 @@ export interface Request extends RequestBase {
* @server_default false
*/
explain?: boolean
/**
* Configuration of search extensions defined by Elasticsearch plugins.
*/
ext?: Dictionary<string, UserDefinedValue>
/**
* 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
2 changes: 1 addition & 1 deletion specification/cluster/_types/ComponentTemplate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export class ComponentTemplateSummary {
/** @doc_id mapping-meta-field */
_meta?: Metadata
version?: VersionNumber
settings: Dictionary<IndexName, IndexSettings>
settings?: Dictionary<IndexName, IndexSettings>
mappings?: TypeMapping
aliases?: Dictionary<string, AliasDefinition>
}
5 changes: 5 additions & 0 deletions specification/fleet/search/SearchRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ import { SlicedScroll } from '@_types/SlicedScroll'
import { Sort, SortResults } from '@_types/sort'
import { Duration } from '@_types/Time'
import { Checkpoint } from '../_types/Checkpoints'
import { UserDefinedValue } from '@spec_utils/UserDefinedValue'

/**
* The purpose of the fleet search api is to provide a search api where the search will only be executed
Expand Down Expand Up @@ -138,6 +139,10 @@ export interface Request extends RequestBase {
* @server_default false
*/
explain?: boolean
/**
* Configuration of search extensions defined by Elasticsearch plugins.
*/
ext?: Dictionary<string, UserDefinedValue>
/**
* 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
3 changes: 1 addition & 2 deletions specification/indices/_types/IndexSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -260,8 +260,7 @@ export enum IndexCheckOnStartup {
}

export class IndexVersioning {
created: VersionString
created_string?: VersionString
created?: VersionString
}

export class IndexSettingsLifecycle {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export class Response {
expires_in: long
scope?: string
type: string
refresh_token: string
refresh_token?: string
kerberos_authentication_response_token?: string
authentication: AuthenticatedUser
}
Expand Down