diff --git a/CHANGELOG.md b/CHANGELOG.md index 9f94280d8..aa79f3d37 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -63,6 +63,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ### Fixed - Removed incorrect `model_id` from ML `SearchHitsHit`; ML search APIs return a standard search hit and the document ID is `_id` ([#1180](https://github.com/opensearch-project/opensearch-api-specification/issues/1180)) - Fixed `ml.predict_model` and `ml.predict_model_stream` request body schemas to match `RemoteInferenceMLInput` parser: corrected `parameters` type to `Map`, removed incorrect `required` constraints, added `action_type`, `dlq`, `question`, and `context` fields, and added `PredictionActionType` enum ([#1188](https://github.com/opensearch-project/opensearch-api-specification/pull/1188)) +- Fixed `ShardProfile`'s `fetch` to be an array of `FetchProfile`, added missing `inbound_network_time_in_millis` and `outbound_network_time_in_millis` fields, and corrected `FetchProfileBreakdown` to match server serialization ([#1147](https://github.com/opensearch-project/opensearch-api-specification/pull/1147)) - Fixed stale and malformed OpenSearch documentation links in spec `externalDocs` and schema descriptions ([#1163](https://github.com/opensearch-project/opensearch-api-specification/pull/1163)) - Fixed `DeletedPit` to mark `pit_id` and `successful` as required ([#1146](https://github.com/opensearch-project/opensearch-api-specification/pull/1146)) - Fixed `HitsMetadata` to mark `max_score` as required ([#1103](https://github.com/opensearch-project/opensearch-api-specification/pull/1103)) diff --git a/spec/schemas/_core.search.yaml b/spec/schemas/_core.search.yaml index 6f43fb904..2e7916c00 100644 --- a/spec/schemas/_core.search.yaml +++ b/spec/schemas/_core.search.yaml @@ -194,12 +194,21 @@ components: $ref: '#/components/schemas/AggregationProfile' id: type: string + inbound_network_time_in_millis: + x-version-added: '2.0' + $ref: '_common.yaml#/components/schemas/DurationValueUnitMillis' + outbound_network_time_in_millis: + x-version-added: '2.0' + $ref: '_common.yaml#/components/schemas/DurationValueUnitMillis' searches: type: array items: $ref: '#/components/schemas/SearchProfile' fetch: - $ref: '#/components/schemas/FetchProfile' + x-version-added: '3.2' + type: array + items: + $ref: '#/components/schemas/FetchProfile' required: - aggregations - id @@ -531,30 +540,48 @@ components: FetchProfileBreakdown: type: object properties: + build_sub_phase_processors: + type: integer + format: int64 + build_sub_phase_processors_count: + type: integer + format: int64 + create_stored_fields_visitor: + type: integer + format: int64 + create_stored_fields_visitor_count: + type: integer + format: int64 + get_next_reader: + type: integer + format: int64 + get_next_reader_count: + type: integer + format: int64 load_source: type: integer - format: int32 + format: int64 load_source_count: type: integer - format: int32 + format: int64 load_stored_fields: type: integer - format: int32 + format: int64 load_stored_fields_count: type: integer - format: int32 - next_reader: - type: integer - format: int32 - next_reader_count: + format: int64 + process: type: integer - format: int32 + format: int64 process_count: type: integer - format: int32 - process: + format: int64 + set_next_reader: type: integer - format: int32 + format: int64 + set_next_reader_count: + type: integer + format: int64 FetchProfileDebug: type: object properties: diff --git a/tests/default/_core/search/profile.yaml b/tests/default/_core/search/profile.yaml new file mode 100644 index 000000000..cb98d3db0 --- /dev/null +++ b/tests/default/_core/search/profile.yaml @@ -0,0 +1,33 @@ +$schema: ../../../../json_schemas/test_story.schema.yaml + +description: Test search endpoint with profile API enabled. +warnings: + invalid-path-detected: false +prologues: + - path: /movies/_doc + method: POST + parameters: + refresh: true + request: + payload: + director: Bennett Miller + title: Moneyball + year: 2011 + status: [201] +epilogues: + - path: /movies + method: DELETE + status: [200, 404] +chapters: + - synopsis: Search with profile enabled returns fetch as an array. + path: /{index}/_search + parameters: + index: movies + method: POST + request: + payload: + profile: true + query: + match_all: {} + response: + status: 200