Skip to content
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
4 changes: 2 additions & 2 deletions output/schema/schema.json

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

4 changes: 2 additions & 2 deletions output/typescript/types.ts

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

10 changes: 8 additions & 2 deletions specification/_global/search/_types/hits.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@ export class Hit<TDocument> {
* on a search request. Otherwise the field is always present on hits.
*/
_id?: Id
_score: double | null
// While _score is always returned by Elasticsearch, making it required
// breaks downstream JavaScript users for little added benefit
// See https://github.com/elastic/elasticsearch-specification/pull/5248
_score?: double | null
_explanation?: Explanation
fields?: Dictionary<string, UserDefinedValue>
highlight?: Dictionary<string, string[]>
Expand All @@ -69,7 +72,10 @@ export class HitsMetadata<T> {
total?: TotalHits | long
hits: Hit<T>[]

max_score: double | null
// While max_score is always returned by Elasticsearch, making it required
// breaks downstream JavaScript users for little added benefit
// See https://github.com/elastic/elasticsearch-specification/pull/5248
max_score?: double | null
}

export class HitMetadata<TDocument> {
Expand Down