Fix plugin schemas against server source: types, missing fields, composition, versioning - #1113
Open
sean- wants to merge 20 commits into
Open
Fix plugin schemas against server source: types, missing fields, composition, versioning#1113sean- wants to merge 20 commits into
sean- wants to merge 20 commits into
Conversation
sean-
requested review from
Tokesh,
VachaShah,
Xtansia,
aabeshov,
harshavamsi,
karenyrx,
lucy66hw and
sachetalva
as code owners
May 16, 2026 05:46
sean-
force-pushed
the
fix-search-hit-allof
branch
3 times, most recently
from
May 19, 2026 00:35
d628228 to
63a6111
Compare
SearchResult, HitsMetadataJsonValue, and SearchResultJsonValue define allOf overrides that specialize the _source generic type parameter on hit items. These overrides used bare inline objects with only _source, which shadows the Hit schema and drops _id, _index, _score, sort, and all other hit fields from generated client types. The correct pattern already exists in HitsMetadata.hits (allOf with $ref to Hit plus the _source specialization). Apply the same pattern to the three broken sites, and fix SearchResultJsonValue completion suggest options to compose with CompletionSuggestOption. Affected schemas: - HitsMetadataJsonValue.hits.items - SearchResult.hits.hits.items - SearchResultJsonValue.hits.hits.items - SearchResultJsonValue.suggest.completion.options Downstream consumers fixed by inheritance: - MultiSearchItem (_core.msearch) - SearchResponse / AsynchronousSearch - TopHitsAggregate (_common.aggregations) [`SearchHit.toInnerXContent`](https://github.com/opensearch-project/OpenSearch/blob/27333365da0d55a16bea2ebaf34f6f2a691f6d50/server/src/main/java/org/opensearch/search/SearchHit.java#L667-L763) serializes _index, _id, _score, _version, _seq_no, _primary_term, _source, fields, highlight, sort, matched_queries, _explanation, inner_hits, _shard, _node, and metadata fields. Field name constants are defined in [`SearchHit.Fields`](https://github.com/opensearch-project/OpenSearch/blob/27333365da0d55a16bea2ebaf34f6f2a691f6d50/server/src/main/java/org/opensearch/search/SearchHit.java#L632-L650). The `sort` array is written by [`SearchSortValues.toXContent`](https://github.com/opensearch-project/OpenSearch/blob/27333365da0d55a16bea2ebaf34f6f2a691f6d50/server/src/main/java/org/opensearch/search/SearchSortValues.java#L104-L113), called unconditionally from `toInnerXContent` at line 732. The spec's bare `{_source: TDocument}` inline type dropped all of these except _source. [`CompletionSuggestion.Entry.Option.toXContent`](https://github.com/opensearch-project/OpenSearch/blob/27333365da0d55a16bea2ebaf34f6f2a691f6d50/server/src/main/java/org/opensearch/search/suggest/completion/CompletionSuggestion.java#L360-L379) writes `text`, then delegates to `hit.toInnerXContent` (line 363), inlining the full SearchHit field set into each completion option. The spec's bare `{_source}` override dropped text, _index, _id, _score, and contexts. [`InternalTopHits.doXContentBody`](https://github.com/opensearch-project/OpenSearch/blob/27333365da0d55a16bea2ebaf34f6f2a691f6d50/server/src/main/java/org/opensearch/search/aggregations/metrics/InternalTopHits.java#L212-L215) delegates to `SearchHits.toXContent`, which uses the same `SearchHit.toInnerXContent` serialization. The HitsMetadataJsonValue override previously reduced top_hits results to only _source. Signed-off-by: Sean Chittenden <sean.chittenden@crowdstrike.com>
The OpenSearch server stores all score fields as Java `float` (32-bit), not `double` (64-bit). Fix the spec to match. Affected schemas: - Hit._score: double → float - Hit.matched_queries (scores variant): double → float - PhraseSuggestOption.score: double → float - TermSuggestOption.score: double → float Server references: - SearchHit.java:106 `private float score` https://github.com/opensearch-project/OpenSearch/blob/b7dca4aced6719f4b5b909a81388d62292deb934/server/src/main/java/org/opensearch/search/SearchHit.java#L106 - SearchHit.java:125 `Map<String, Float> matchedQueries` https://github.com/opensearch-project/OpenSearch/blob/b7dca4aced6719f4b5b909a81388d62292deb934/server/src/main/java/org/opensearch/search/SearchHit.java#L125 - Suggest.java:634 base Option `private float score` https://github.com/opensearch-project/OpenSearch/blob/0d54c1600b16081c15902a095111a9a530767099/server/src/main/java/org/opensearch/search/suggest/Suggest.java#L634 - PhraseSuggestion.java:184 `Option(Text, Text, float, Boolean)` https://github.com/opensearch-project/OpenSearch/blob/a250c354aa0e6d0790bd59ad4c68066610f16db7/server/src/main/java/org/opensearch/search/suggest/phrase/PhraseSuggestion.java#L184 - TermSuggestion.java:231 `Option(Text, int, float)` https://github.com/opensearch-project/OpenSearch/blob/e3542011cd9584c354405ba6cbf9a31ced7bc5ce/server/src/main/java/org/opensearch/search/suggest/term/TermSuggestion.java#L231 Signed-off-by: Sean Chittenden <sean.chittenden@crowdstrike.com>
The OpenSearch server stores TermSuggestOption.freq as Java `int` (32-bit), not `long` (64-bit). Fix the spec to match. Affected schemas: - TermSuggestOption.freq: int64 → int32 Server references: - TermSuggestion.java:229 `private int freq` https://github.com/opensearch-project/OpenSearch/blob/e3542011cd9584c354405ba6cbf9a31ced7bc5ce/server/src/main/java/org/opensearch/search/suggest/term/TermSuggestion.java#L229 Signed-off-by: Sean Chittenden <sean.chittenden@crowdstrike.com>
The ignored_field_values field in the Hit schema does not exist in the OpenSearch server. SearchHit.toInnerXContent() never writes this field, and no corresponding Java field exists anywhere in the OpenSearch codebase. Mark it deprecated since 1.0.0. Server reference (field absent from serialization): - SearchHit.java:667-763 toInnerXContent() — no ignored_field_values https://github.com/opensearch-project/OpenSearch/blob/b7dca4aced6719f4b5b909a81388d62292deb934/server/src/main/java/org/opensearch/search/SearchHit.java#L667-L763 Signed-off-by: Sean Chittenden <sean.chittenden@crowdstrike.com>
ml._common.yaml and flow_framework.common.yaml both re-defined standard OpenSearch types (ShardStatistics, TotalHits, Hit, SearchResult) inline. Replace them with $refs to the canonical definitions in _common.yaml and _core.search.yaml. ml._common.yaml: - SearchResponse: allOf with _core.search.yaml SearchResult - HitsTotal: $ref to _core.search.yaml TotalHits - SearchHitsHit: allOf with _core.search.yaml Hit + ml-specific fields flow_framework.common.yaml: - shards: $ref to _common.yaml ShardStatistics - total: $ref to _core.search.yaml TotalHits - itemsObject: allOf with _core.search.yaml Hit + _source override - StateItems: allOf with _core.search.yaml Hit + _source override Both plugins delegate to OpenSearch's standard SearchResponse on the server side, so the spec should compose with the same canonical types: - ml-commons search actions delegate to core SearchResponse: https://github.com/opensearch-project/ml-commons/blob/be86ad045dac49f35d811b74f2928a27536da2a4/plugin/src/main/java/org/opensearch/ml/rest/RestMLSearchModelAction.java - flow-framework search actions delegate to core SearchResponse: https://github.com/opensearch-project/flow-framework/blob/30ed527ae0b121ee7e47db8326d6672ca4d76aa8/src/main/java/org/opensearch/flowframework/rest/RestSearchWorkflowAction.java - Core SearchResponse.innerToXContent (authoritative field list): https://github.com/opensearch-project/OpenSearch/blob/b7dca4aced6719f4b5b909a81388d62292deb934/server/src/main/java/org/opensearch/action/search/SearchResponse.java#L340-L371 - Core SearchHit.toInnerXContent (authoritative Hit fields): https://github.com/opensearch-project/OpenSearch/blob/b7dca4aced6719f4b5b909a81388d62292deb934/server/src/main/java/org/opensearch/search/SearchHit.java#L667-L763 - Core SearchHits.toXContent (authoritative TotalHits/max_score): https://github.com/opensearch-project/OpenSearch/blob/e15f71265e1da74d89025373ec96980fffb93640/server/src/main/java/org/opensearch/search/SearchHits.java#L235-L260 Signed-off-by: Sean Chittenden <sean.chittenden@crowdstrike.com>
Add fields that the OpenSearch security plugin serializes but were missing from the OpenAPI specification: CertificatesDetail: add format, alias, serial_number, has_private_key and reorder properties to match server serialization order. - https://github.com/opensearch-project/security/blob/7466266028dbf39a25dfddcee795cedfbbbf889d/src/main/java/org/opensearch/security/dlic/rest/api/ssl/CertificateInfo.java#L101-L112 WhoAmI: add is_authenticated. - https://github.com/opensearch-project/security/blob/7466266028dbf39a25dfddcee795cedfbbbf889d/src/main/java/org/opensearch/security/action/whoami/WhoAmIResponse.java#L94 DashboardsInfo: add resource_sharing_enabled. - https://github.com/opensearch-project/security/blob/7466266028dbf39a25dfddcee795cedfbbbf889d/src/main/java/org/opensearch/security/rest/DashboardsInfoAction.java#L158 Signed-off-by: Sean Chittenden <sean.chittenden@crowdstrike.com>
GetAlertsResponse.total_alerts: int64 → int32 (Java Integer) - https://github.com/opensearch-project/security-analytics/blob/4c3d533dd7d71d734f94deb9038fd9b46ae368f2/src/main/java/org/opensearch/securityanalytics/action/GetAlertsResponse.java#L27 GetFindingsResponse.total_findings: int64 → int32 (Java Integer) - https://github.com/opensearch-project/security-analytics/blob/4c3d533dd7d71d734f94deb9038fd9b46ae368f2/src/main/java/org/opensearch/securityanalytics/action/GetFindingsResponse.java#L29 FindingWithScore.score: float → double (Java Double) - https://github.com/opensearch-project/security-analytics/blob/4c3d533dd7d71d734f94deb9038fd9b46ae368f2/src/main/java/org/opensearch/securityanalytics/model/FindingWithScore.java#L30 Signed-off-by: Sean Chittenden <sean.chittenden@crowdstrike.com>
HeaderParamsMap.additionalProperties: integer int32 → string HTTP header values are strings, not integers. The server's Kotlin SPI defines this as Map<String, String>. - https://github.com/opensearch-project/notifications/blob/690f3df226f2da10da23bb717ff151406be8c436/notifications/core-spi/src/main/kotlin/org/opensearch/notifications/spi/model/destination/CustomWebhookDestination.kt#L15 Signed-off-by: Sean Chittenden <sean.chittenden@crowdstrike.com>
…m error fields Type fixes in FlowFrameworkGetResponse: - last_provisioned_time: number → integer int64 - created_time, last_updated_time: add format int64 https://github.com/opensearch-project/flow-framework/blob/30ed527ae0b121ee7e47db8326d6672ca4d76aa8/src/main/java/org/opensearch/flowframework/model/Template.java#L386-L394 Type fixes in WorkFlowStatusFullResponse: - resources_created items: string → $ref ResourcesCreated - user_outputs: array of string → object (Map<String, Object>) - provision_start_time, provision_end_time: string date-time → integer int64 https://github.com/opensearch-project/flow-framework/blob/30ed527ae0b121ee7e47db8326d6672ca4d76aa8/src/main/java/org/opensearch/flowframework/model/WorkflowState.java#L381-L396 Type fix in WorkFlowStatusDefaultResponse: - resources_created items: string → $ref ResourcesCreated https://github.com/opensearch-project/flow-framework/blob/30ed527ae0b121ee7e47db8326d6672ca4d76aa8/src/main/java/org/opensearch/flowframework/model/WorkflowState.java#L396 Missing fields added: - FlowFrameworkGetResponse: ui_metadata, tenant_id (3.0.0), all_shared_principals (3.4.0) https://github.com/opensearch-project/flow-framework/blob/30ed527ae0b121ee7e47db8326d6672ca4d76aa8/src/main/java/org/opensearch/flowframework/model/Template.java#L378-L407 - FlowFrameworkCreate/Update: ui_metadata https://github.com/opensearch-project/flow-framework/blob/30ed527ae0b121ee7e47db8326d6672ca4d76aa8/src/main/java/org/opensearch/flowframework/model/Template.java#L530 - WorkFlowStatusFullResponse: tenant_id (3.0.0), all_shared_principals (3.4.0) https://github.com/opensearch-project/flow-framework/blob/30ed527ae0b121ee7e47db8326d6672ca4d76aa8/src/main/java/org/opensearch/flowframework/model/WorkflowState.java#L399-L408 Remove phantom status/code fields from 15 error schemas. The server's FlowFrameworkException.toXContent() has never serialized these fields in any version — it only writes {"error": "..."}. https://github.com/opensearch-project/flow-framework/blob/30ed527ae0b121ee7e47db8326d6672ca4d76aa8/src/main/java/org/opensearch/flowframework/exception/FlowFrameworkException.java#L88-L89 Signed-off-by: Sean Chittenden <sean.chittenden@crowdstrike.com>
Add bootstrap_details (RestoreDetails) and shard_replication_details (array of ShardInfoResponse) to the Status response, with fully typed RestoreDetails and ShardInfoResponse schemas matching the server. Also fix SyncingDetails leader_checkpoint and follower_checkpoint to include format: int64 (server uses Kotlin Long). Status.toXContent(): - https://github.com/opensearch-project/cross-cluster-replication/blob/7163e2227c4d6ba187b6d7070d871b9bd79b214a/src/main/kotlin/org/opensearch/replication/action/status/ReplicationStatusResponse.kt#L76-L97 RestoreDetails.toXContent(): - https://github.com/opensearch-project/cross-cluster-replication/blob/7163e2227c4d6ba187b6d7070d871b9bd79b214a/src/main/kotlin/org/opensearch/replication/action/status/ShardInfoResponse.kt#L149-L161 ShardInfoResponse.toXContent(): - https://github.com/opensearch-project/cross-cluster-replication/blob/7163e2227c4d6ba187b6d7070d871b9bd79b214a/src/main/kotlin/org/opensearch/replication/action/status/ShardInfoResponse.kt#L76-L85 Signed-off-by: Sean Chittenden <sean.chittenden@crowdstrike.com>
The job-scheduler SPI Schedule type is a discriminated union of CronSchedule and IntervalSchedule. The spec only had interval. - Add cron as a sibling of interval in Schedule (with minProperties/ maxProperties: 1) - Remove misplaced cron from inside Interval (it was never a sub-field) - Fix Interval.start_time: number → integer int64 (Instant.toEpochMilli) - Fix Interval.period: number → integer int32 (Java int) - Fix Interval.schedule_delay: number → integer int64 (Java Long) - Add schedule_delay to Cron (also Java Long, added in 1.3.0) IntervalSchedule.toXContent(): - https://github.com/opensearch-project/job-scheduler/blob/9c19efe52dc19c25028ab6fe989ac6fed4a56a46/spi/src/main/java/org/opensearch/jobscheduler/spi/schedule/IntervalSchedule.java#L63-L79 CronSchedule.toXContent(): - https://github.com/opensearch-project/job-scheduler/blob/9c19efe52dc19c25028ab6fe989ac6fed4a56a46/spi/src/main/java/org/opensearch/jobscheduler/spi/schedule/CronSchedule.java#L73-L89 Signed-off-by: Sean Chittenden <sean.chittenden@crowdstrike.com>
ResponseBody fixes: - start_time_in_millis: number → integer int64 (Java long) - expiration_time_in_millis: number → integer int64 (Java long) - Remove phantom took field (not serialized at top level) - Add error field as $ref ErrorCause (OpenSearchException) https://github.com/opensearch-project/asynchronous-search/blob/1b6afb4b8f97a824d2c2d57d72b4970ad3fcd719/src/main/java/org/opensearch/search/asynchronous/response/AsynchronousSearchResponse.java#L130-L149 AsynchronousSearchStats: add format int64 to all 9 counters (Java long) https://github.com/opensearch-project/asynchronous-search/blob/1b6afb4b8f97a824d2c2d57d72b4970ad3fcd719/src/main/java/org/opensearch/search/asynchronous/stats/AsynchronousSearchCountStats.java#L82-L95 Signed-off-by: Sean Chittenden <sean.chittenden@crowdstrike.com>
Upload stats counters (UploadStatsTotal, UploadStatsMetric): all counters and duration fields are Java long, not int or DurationValueUnitMillis. - https://github.com/opensearch-project/geospatial/blob/9daca8990d630830c0cebb652c713d56db7677bf/src/main/java/org/opensearch/geospatial/stats/upload/TotalUploadStats.java#L48-L56 - https://github.com/opensearch-project/geospatial/blob/9daca8990d630830c0cebb652c713d56db7677bf/src/main/java/org/opensearch/geospatial/stats/upload/UploadMetric.java#L93-L95 GeoSpatialGeojsonUploadResponse: add failures array with id, status, message. - https://github.com/opensearch-project/geospatial/blob/9daca8990d630830c0cebb652c713d56db7677bf/src/main/java/org/opensearch/geospatial/action/upload/geojson/UploadGeoJSONResponse.java#L102-L117 Database: add format int64 to valid_for_in_days (Java Long), add updated_at readable string field. - https://github.com/opensearch-project/geospatial/blob/9daca8990d630830c0cebb652c713d56db7677bf/src/main/java/org/opensearch/geospatial/ip2geo/jobscheduler/Datasource.java#L525 UpdateStats: add missing last_failed_at*, last_skipped_at*, last_succeeded_at fields; fix last_processing_time_in_millis to integer int64 (was EpochTimeUnitMillis but it's a duration, not a timestamp). - https://github.com/opensearch-project/geospatial/blob/9daca8990d630830c0cebb652c713d56db7677bf/src/main/java/org/opensearch/geospatial/ip2geo/jobscheduler/Datasource.java#L674-L701 Signed-off-by: Sean Chittenden <sean.chittenden@crowdstrike.com>
Add 13 missing stat names to NeuralStatName enum: - 7 event stats: semantic_highlighting_batch_request_count (3.3.0), agentic_query_translator_executions (3.2.0), agentic_context_executions (3.3.0), agentic_query_requests (3.2.0), seismic_query_requests (3.3.0), sparse_encoding_seismic_executions (3.5.0), mmr_neural_query_transformer_executions (3.3.0) - 2 info stats: agentic_query_translator_processors (3.2.0), agentic_context_processors (3.3.0) - 4 memory metric stats: sparse_memory_usage, sparse_memory_usage_percentage, forward_index_usage, clustered_posting_usage (all 3.3.0) Add corresponding flat/nested schema entries for all stats, new MemoryStat type for memory stats (Double values), and agentic/memory sub-schemas for the nested response variant. Server: opensearch-project/neural-search @ 348e49aa7979645e888bb4e143ec07a47f2bf467 - EventStatName.java: https://github.com/opensearch-project/neural-search/blob/348e49aa7979645e888bb4e143ec07a47f2bf467/src/main/java/org/opensearch/neuralsearch/stats/events/EventStatName.java#L82-L275 - InfoStatName.java: https://github.com/opensearch-project/neural-search/blob/348e49aa7979645e888bb4e143ec07a47f2bf467/src/main/java/org/opensearch/neuralsearch/stats/info/InfoStatName.java#L97-L105 - MetricStatName.java: https://github.com/opensearch-project/neural-search/blob/348e49aa7979645e888bb4e143ec07a47f2bf467/src/main/java/org/opensearch/neuralsearch/stats/metrics/MetricStatName.java#L22-L26 - MemoryStat.java: https://github.com/opensearch-project/neural-search/blob/348e49aa7979645e888bb4e143ec07a47f2bf467/src/main/java/org/opensearch/neuralsearch/stats/metrics/MemoryStat.java#L52-L59 Signed-off-by: Sean Chittenden <sean.chittenden@crowdstrike.com>
Rename query_hashcode to query_group_hashcode to match server constant. Add format: int64 to timestamp, taskId, parentTaskId, cpu_time_in_nanos, memory_in_bytes; format: int32 to total_shards and Measurement.count. Add additionalProperties to phase_latency_map (Map<String, Long>). Change Measurement.number from integer to number (Java Number type). Add AggregationType enum (NONE, AVERAGE, SUM) to Measurement. Remove lowercase duplicates from GroupingType enum (server always emits uppercase via Enum.toString() through XContentBuilder). Add 8 missing TopQuery fields: description, is_cancelled (3.1.0), wlm_group_id (3.3.0), username, user_roles, backend_roles, source_truncated (3.5.0), failed (3.6.0). Server: opensearch-project/query-insights @ 5a140df038cc65abab9f7496a781921892cfefbb - SearchQueryRecord.java: https://github.com/opensearch-project/query-insights/blob/5a140df038cc65abab9f7496a781921892cfefbb/src/main/java/org/opensearch/plugin/insights/rules/model/SearchQueryRecord.java#L115-L154 - Measurement.java: https://github.com/opensearch-project/query-insights/blob/5a140df038cc65abab9f7496a781921892cfefbb/src/main/java/org/opensearch/plugin/insights/rules/model/Measurement.java#L33 - AggregationType.java: https://github.com/opensearch-project/query-insights/blob/5a140df038cc65abab9f7496a781921892cfefbb/src/main/java/org/opensearch/plugin/insights/rules/model/AggregationType.java#L14-L17 - GroupingType.java: https://github.com/opensearch-project/query-insights/blob/5a140df038cc65abab9f7496a781921892cfefbb/src/main/java/org/opensearch/plugin/insights/rules/model/GroupingType.java#L19-L21 - XContentBuilder.java (enum handling): https://github.com/opensearch-project/OpenSearch/blob/44818b452e88303de7e3127a2e91f4becb947055/libs/core/src/main/java/org/opensearch/core/xcontent/XContentBuilder.java#L934-L936 Signed-off-by: Sean Chittenden <sean.chittenden@crowdstrike.com>
- ObservabilityObjectList: add format: int64 to startIndex/totalHits, add enum: [eq, gte] to totalHitRelation - ObservabilityObject: add format: int64 to lastUpdatedTimeMs/createdTimeMs, add access array of string - SavedVisualization: add 6 missing fields (application_id, user_configs, sub_type, metric_type, units_of_measure, selected_labels) Server: opensearch-project/observability @ 0e96dd07aab125d506881e63c8c8ec5b4e80409e - https://github.com/opensearch-project/observability/blob/0e96dd07aab125d506881e63c8c8ec5b4e80409e/src/main/kotlin/org/opensearch/observability/model/SearchResults.kt#L22-L44 - https://github.com/opensearch-project/observability/blob/0e96dd07aab125d506881e63c8c8ec5b4e80409e/src/main/kotlin/org/opensearch/observability/model/ObservabilityObjectDoc.kt#L36 - https://github.com/opensearch-project/observability/blob/0e96dd07aab125d506881e63c8c8ec5b4e80409e/src/main/kotlin/org/opensearch/observability/model/ObservabilityObjectDoc.kt#L168-L173 - https://github.com/opensearch-project/observability/blob/0e96dd07aab125d506881e63c8c8ec5b4e80409e/src/main/kotlin/org/opensearch/observability/model/SavedVisualization.kt#L83-L88 - https://github.com/opensearch-project/observability/blob/0e96dd07aab125d506881e63c8c8ec5b4e80409e/src/main/kotlin/org/opensearch/observability/model/SavedVisualization.kt#L264-L269 Signed-off-by: Sean Chittenden <sean.chittenden@crowdstrike.com>
- PutSearchConfigurationRequest: add missing description field - PostQuerySetsRequest: add missing ubiQueriesIndex field - UBI Initialize: change response type from string to object with message Server: opensearch-project/search-relevance @ 0acb9aa418947b08b880bbec2178e0981b4e5d8b - src/main/java/org/opensearch/searchrelevance/rest/RestPutSearchConfigurationAction.java#L77 - src/main/java/org/opensearch/searchrelevance/rest/RestCreateQuerySetAction.java#L96 Server: opensearch-project/user-behavior-insights @ 452e732688074531338a8dda0278b3f9764f9157 - src/main/java/org/opensearch/ubi/UbiRestHandler.java#L137 Signed-off-by: Sean Chittenden <sean.chittenden@crowdstrike.com>
- NodeStats.graph_memory_usage and training_memory_usage: change from ByteCount to integer int64 (server reports kilobytes, not bytes) - KnnStatName: add remote_vector_index_build_stats - TrainedModel: add missing data_type, space_type, engine fields - Define ModelResponse schema with all server-emitted fields and ModelState enum (created/failed/training) for knn.get_model endpoint Server: opensearch-project/k-NN @ 6818ab05d180e92337e65dd8bbffd423ed59cac8 - src/main/java/org/opensearch/knn/plugin/stats/KNNStats.java#L126-L127 - src/main/java/org/opensearch/knn/plugin/stats/KNNStats.java#L179-L180 - src/main/java/org/opensearch/knn/plugin/stats/StatNames.java#L56 - src/main/java/org/opensearch/knn/plugin/rest/RestTrainModelHandler.java#L128-L138 - src/main/java/org/opensearch/knn/indices/Model.java#L186-L194 - src/main/java/org/opensearch/knn/indices/ModelMetadata.java#L521-L554 - src/main/java/org/opensearch/knn/indices/ModelState.java#L24-L26 Signed-off-by: Sean Chittenden <sean.chittenden@crowdstrike.com>
- Mark old /_wlm/query_group paths with x-version-removed: 3.0.0 - Add new /_wlm/workload_group paths with x-version-added: 3.0.0 - Rename GET response key from query_groups to workload_groups - Keep old QueryGroup* schemas for 2.x operations - Add new WorkloadGroup* schemas with settings field (3.7.0) - settings is Map<String, String> (search settings for the group) Server: opensearch-project/OpenSearch @ 44818b452e88303de7e3127a2e91f4becb947055 - plugins/workload-management/src/main/java/org/opensearch/plugin/wlm/rest/RestGetWorkloadGroupAction.java#L51 - plugins/workload-management/src/main/java/org/opensearch/plugin/wlm/rest/RestCreateWorkloadGroupAction.java#L59 - plugins/workload-management/src/main/java/org/opensearch/plugin/wlm/action/GetWorkloadGroupResponse.java#L60 - server/src/main/java/org/opensearch/wlm/MutableWorkloadGroupFragment.java#L38-L43 - server/src/main/java/org/opensearch/wlm/MutableWorkloadGroupFragment.java#L153-L168 Signed-off-by: Sean Chittenden <sean.chittenden@crowdstrike.com>
RestPatchExperimentAction registers PATCH /_plugins/_search_relevance/experiments/{id}
for partial updates to name/description, but the spec had no corresponding path entry.
Added on the 3.6 branch of opensearch-project/search-relevance (commit a8c5874).
Signed-off-by: Sean Chittenden <sean.chittenden@crowdstrike.com>
sean-
force-pushed
the
fix-search-hit-allof
branch
from
May 19, 2026 05:13
e17006f to
dc73a70
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Field-by-field audit of every plugin schema in the OpenAPI spec against the OpenSearch server and plugin source code. Fixes type mismatches, adds missing fields, removes phantom fields, consolidates duplicate inline schemas into
$refs, fixesallOfcomposition, addsx-version-added/x-version-removedannotations, and removes thetype: object+$refanti-pattern where found.Every change is verified against a pinned server commit with GitHub permalink citations in the commit messages.
Core search types
SearchResult,HitsMetadataJsonValue, andSearchResultJsonValuehit items to compose withHitviaallOf, restoring_id,_index,_score,sort, and other hit fields lost by bare_source-only inline overridesSearchResultJsonValuecompletion suggest options to compose withCompletionSuggestOptionHit._scoreandmatched_queriesscore format fromdoubletofloat; fixPhraseSuggestOption.scoreandTermSuggestOption.scorefromdoubletofloatTermSuggestOption.freqformat fromint64toint32Hit.ignored_field_valuesas an Elasticsearch-only field not present in OpenSearchml._common.yamlandflow_framework.common.yamlto use$refs to canonicalSearchResult,TotalHits,Hit, andShardStatisticsSecurity (
security._common.yaml)format,alias,serial_number,has_private_keytoCertificatesDetail(3.0.0);is_authenticatedtoWhoAmI;resource_sharing_enabledtoDashboardsInfo(3.3.0)Security Analytics (
security_analytics.*.yaml)GetAlertsResponse.total_alertsandGetFindingsResponse.total_findingsformat fromint64toint32(JavaInteger)FindingWithScore.scoreformat fromfloattodouble(JavaDouble)Notifications (
notifications._common.yaml)HeaderParamsMapadditionalProperties type frominteger int32tostringFlow Framework (
flow_framework.common.yaml,flow_framework.errors.yaml)last_provisioned_timetointeger int64,created_time/last_updated_timeaddformat: int64,resources_createditems fromstringtoResourcesCreated,user_outputsfromarray of stringtoobject,provision_start_time/provision_end_timefromstring date-timetointeger int64ui_metadata,tenant_id(3.0.0),all_shared_principals(3.4.0)status/codefields from 15 error schemas (server only writes{"error": "..."})Cross-Cluster Replication (
replication._common.yaml)bootstrap_details(with fullRestoreDetailstype) andshard_replication_details(withShardInfoResponsetype) toStatusformat: int64toSyncingDetailscheckpoint fieldsRollups (
rollups._common.yaml)cronvariant toSchedule(was interval-only)cronfrom insideIntervalstart_timeandschedule_delaytointeger int64,periodtointeger int32Asynchronous Search (
asynchronous_search._common.yaml)start_time_in_millis/expiration_time_in_millisfromnumbertointeger int64tookfield (not at top level in response)errorasErrorCauseformat: int64to allAsynchronousSearchStatscountersGeospatial (
geospatial._common.yaml)integer int64failuresarray withUploadFailureschema toGeoSpatialGeojsonUploadResponseformat: int64toDatabase.valid_for_in_daysandupdated_atfieldlast_failed_at*,last_skipped_at*,last_succeeded_atfields toUpdateStatsNeural Search (
neural._common.yaml)semantic_highlighting_batch_request_count(3.3.0),agentic_query_translator_executions(3.2.0),agentic_context_executions(3.3.0),agentic_query_requests(3.2.0),seismic_query_requests(3.3.0),sparse_encoding_seismic_executions(3.5.0),mmr_neural_query_transformer_executions(3.3.0)agentic_query_translator_processors(3.2.0),agentic_context_processors(3.3.0)MemoryStattype:sparse_memory_usage,sparse_memory_usage_percentage,forward_index_usage,clustered_posting_usage(all 3.3.0)Query Insights (
insights._common.yaml)query_hashcodetoquery_group_hashcodeformat: int64totimestamp,format: int32tototal_shardsadditionalPropertiestophase_latency_mapGroupingTypeenum to server-emitted uppercase values only (NONE,SIMILARITY)description(3.0.0),is_cancelled(3.1.0),wlm_group_id(3.3.0),username/user_roles/backend_roles/source_truncated(3.5.0),failed(3.6.0)Measurement.numberfromintegertonumber, addaggregationTypeenumformat: int64toTaskResourceUsages.taskId/parentTaskIdandTaskResourceUsagefieldstype: object+$refanti-pattern from 6 locationsObservability (
observability._common.yaml)format: int64tostartIndex/totalHits, addenum: [eq, gte]tototalHitRelationformat: int64tolastUpdatedTimeMs/createdTimeMsaccessarray (1.2.0)SavedVisualizationfields:application_id,user_configs,sub_type,metric_type,units_of_measure,selected_labels(all 1.3.0)Search Relevance & UBI (
search_relevance._common.yaml,ubi._common.yaml)descriptiontoPutSearchConfigurationRequestubiQueriesIndextoPostQuerySetsRequestInitializeresponse type fromstringtoobjectwithmessagefieldk-NN (
knn._common.yaml,knn.yaml)graph_memory_usageandtraining_memory_usagefromByteCounttointeger int64(server reports kilobytes, not bytes)remote_vector_index_build_statstoKnnStatNameenumdata_type(2.16.0),space_type/engine(2.17.0) toTrainedModelModelResponseschema withModelStateenum forknn.get_modelendpoint; addx-version-added: 2.17.0todata_type/mode/compression_level/model_versionresponse fieldsWLM (
wlm._common.yaml,wlm.yaml)/_wlm/query_grouppaths withx-version-removed: 3.0.0(renamed in server 3.0.0)/_wlm/workload_grouppaths withx-version-added: 3.0.0query_groupstoworkload_groupssettingsfield (Map<String, String>) toWorkloadGroupResponse/Create/Update(3.7.0)Server sources verified
44818b452e88303de7e3127a2e91f4becb9470557466266028dbf39a25dfddcee795cedfbbbf889d4c3d533dd7d71d734f94deb9038fd9b46ae368f2690f3df226f2da10da23bb717ff151406be8c43630ed527ae0b121ee7e47db8326d6672ca4d76aa87163e2227c4d6ba187b6d7070d871b9bd79b214a36eb525dabe1265b5e27559952233d49cf63cf5e1b6afb4b8f97a824d2c2d57d72b4970ad3fcd7199daca8990d630830c0cebb652c713d56db7677bf348e49aa7979645e888bb4e143ec07a47f2bf4675a140df038cc65abab9f7496a781921892cfefbb0e96dd07aab125d506881e63c8c8ec5b4e80409e0acb9aa418947b08b880bbec2178e0981b4e5d8b452e732688074531338a8dda0278b3f9764f91576818ab05d180e92337e65dd8bbffd423ed59cac8By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.