diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index 7151bf7f22..a26ab132a0 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -36460,6 +36460,9 @@ { "$ref": "#/components/parameters/search_mvt-size" }, + { + "$ref": "#/components/parameters/search_mvt-track_total_hits" + }, { "$ref": "#/components/parameters/search_mvt-with_labels" } @@ -36525,6 +36528,9 @@ { "$ref": "#/components/parameters/search_mvt-size" }, + { + "$ref": "#/components/parameters/search_mvt-track_total_hits" + }, { "$ref": "#/components/parameters/search_mvt-with_labels" } @@ -122791,6 +122797,16 @@ }, "style": "form" }, + "search_mvt-track_total_hits": { + "in": "query", + "name": "track_total_hits", + "description": "The number of hits matching the query to count accurately.\nIf `true`, the exact number of hits is returned at the cost of some performance.\nIf `false`, the response does not include the total number of hits matching the query.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_global.search._types.TrackHits" + }, + "style": "form" + }, "search_mvt-with_labels": { "in": "query", "name": "with_labels", diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index 74dcaa2efc..1d7aed2a50 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -22670,6 +22670,9 @@ { "$ref": "#/components/parameters/search_mvt-size" }, + { + "$ref": "#/components/parameters/search_mvt-track_total_hits" + }, { "$ref": "#/components/parameters/search_mvt-with_labels" } @@ -22735,6 +22738,9 @@ { "$ref": "#/components/parameters/search_mvt-size" }, + { + "$ref": "#/components/parameters/search_mvt-track_total_hits" + }, { "$ref": "#/components/parameters/search_mvt-with_labels" } @@ -73899,6 +73905,16 @@ }, "style": "form" }, + "search_mvt-track_total_hits": { + "in": "query", + "name": "track_total_hits", + "description": "The number of hits matching the query to count accurately.\nIf `true`, the exact number of hits is returned at the cost of some performance.\nIf `false`, the response does not include the total number of hits matching the query.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_global.search._types.TrackHits" + }, + "style": "form" + }, "search_mvt-with_labels": { "in": "query", "name": "with_labels", diff --git a/output/schema/schema.json b/output/schema/schema.json index cfa7a41e74..01a8808580 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -45879,6 +45879,19 @@ } } }, + { + "description": "The number of hits matching the query to count accurately.\nIf `true`, the exact number of hits is returned at the cost of some performance.\nIf `false`, the response does not include the total number of hits matching the query.", + "name": "track_total_hits", + "required": false, + "serverDefault": "10000", + "type": { + "kind": "instance_of", + "type": { + "name": "TrackHits", + "namespace": "_global.search._types" + } + } + }, { "description": "If `true`, the hits and aggs layers will contain additional point features representing\nsuggested label positions for the original features.\n\n* `Point` and `MultiPoint` features will have one of the points selected.\n* `Polygon` and `MultiPolygon` features will have a single point generated, either the centroid, if it is within the polygon, or another point within the polygon selected from the sorted triangle-tree.\n* `LineString` features will likewise provide a roughly central point selected from the triangle-tree.\n* The aggregation results will provide one central point for each aggregation bucket.\n\nAll attributes from the original features will also be copied to the new label features.\nIn addition, the new features will be distinguishable using the tag `_mvt_label_position`.", "name": "with_labels", @@ -45892,7 +45905,7 @@ } } ], - "specLocation": "_global/search_mvt/SearchMvtRequest.ts#L33-L327" + "specLocation": "_global/search_mvt/SearchMvtRequest.ts#L33-L334" }, { "kind": "response", diff --git a/output/schema/validation-errors.json b/output/schema/validation-errors.json index 02b4e49584..d6e6277181 100644 --- a/output/schema/validation-errors.json +++ b/output/schema/validation-errors.json @@ -37,8 +37,7 @@ }, "search_mvt": { "request": [ - "Request: query parameter 'grid_agg' does not exist in the json spec", - "Request: missing json spec query parameter 'track_total_hits'" + "Request: query parameter 'grid_agg' does not exist in the json spec" ], "response": [] }, diff --git a/output/typescript/types.ts b/output/typescript/types.ts index c5149baafa..a3d76e433f 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -1854,6 +1854,7 @@ export interface SearchMvtRequest extends RequestBase { grid_precision?: integer grid_type?: SearchMvtGridType size?: integer + track_total_hits?: SearchTrackHits with_labels?: boolean body?: { aggs?: Record diff --git a/specification/_global/search_mvt/SearchMvtRequest.ts b/specification/_global/search_mvt/SearchMvtRequest.ts index 18a07a0439..a651907389 100644 --- a/specification/_global/search_mvt/SearchMvtRequest.ts +++ b/specification/_global/search_mvt/SearchMvtRequest.ts @@ -200,6 +200,13 @@ export interface Request extends RequestBase { * @server_default 10000 */ size?: integer + /** + * The number of hits matching the query to count accurately. + * If `true`, the exact number of hits is returned at the cost of some performance. + * If `false`, the response does not include the total number of hits matching the query. + * @server_default 10000 + */ + track_total_hits?: TrackHits /** * If `true`, the hits and aggs layers will contain additional point features representing * suggested label positions for the original features.