diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index ae574c8fce..326e5ccea6 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -32350,8 +32350,7 @@ } }, "required": [ - "_index", - "_id" + "_index" ] }, "_types:IndexName": { diff --git a/output/schema/schema.json b/output/schema/schema.json index e81febd071..21c10326d4 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -35609,7 +35609,7 @@ { "esQuirk": "'_id' is not available when using 'stored_fields: _none_'\non a search request. Otherwise the field is always present on hits.", "name": "_id", - "required": true, + "required": false, "type": { "kind": "instance_of", "type": { diff --git a/output/typescript/types.ts b/output/typescript/types.ts index f12080d51e..731f7f8c12 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -1453,7 +1453,7 @@ export type SearchHighlighterType = 'plain' | 'fvh' | 'unified'| string export interface SearchHit { _index: IndexName - _id: Id + _id?: Id _score?: double | null _explanation?: ExplainExplanation fields?: Record diff --git a/specification/_global/search/_types/hits.ts b/specification/_global/search/_types/hits.ts index 89f82c4631..a4300dd5c1 100644 --- a/specification/_global/search/_types/hits.ts +++ b/specification/_global/search/_types/hits.ts @@ -43,7 +43,7 @@ export class Hit { * @es_quirk '_id' is not available when using 'stored_fields: _none_' * on a search request. Otherwise the field is always present on hits. */ - _id: Id + _id?: Id _score?: double | null _explanation?: Explanation fields?: Dictionary