You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix cat indices API field naming compatibility across OpenSearch versions
OpenSearch 3.2.0+ changed startree query field names from:
- pri.search.startree.query_current -> pri.startree.query_current
- pri.search.startree.query_time -> pri.startree.query_time
- pri.search.startree.query_total -> pri.startree.query_total
This breaks backward compatibility as applications using the client API
would need to change when the server changes field names.
Solution: Implement field consolidation that maintains stable API fields
by consolidating data from version-specific JSON fields into consistent
API fields that applications can rely on.
- Add version-specific fields (V31/V32) for JSON unmarshaling
- Add consolidateFields() method to fan-in data to stable API fields
- Call consolidation after JSON unmarshaling in catClient.Indices()
This ensures applications can use PrimaryStartreeQueryCurrent,
PrimaryStartreeQueryTime, and PrimaryStartreeQueryTotal consistently
regardless of which OpenSearch server version is running.
Signed-off-by: Sean Chittenden <sean.chittenden@crowdstrike.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,6 +20,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
20
20
- Fix nodes stats API compatibility with OpenSearch 3.2.0+ by adding max_last_index_request_timestamp and startree query fields
21
21
- Fix indices stats API compatibility with OpenSearch 3.2.0+ by adding max_last_index_request_timestamp and startree query fields
22
22
- Fix cat APIs compatibility with OpenSearch 3.2.0+ by adding indexing timestamp and startree query fields
23
+
- Fix cat indices API field naming compatibility across OpenSearch versions by implementing field consolidation for startree query fields that changed naming format between 3.1.x and 3.2.0+
23
24
- Fix floating point precision loss in nodes stats concurrent_avg_slice_count field by changing from float32 to float64
24
25
- Fix security plugin health API compatibility with OpenSearch 3.2.0+ by adding settings field
25
26
- Fix nodes stats API compatibility with OpenSearch 3.3.0+ by adding neural_search breaker, query_failed and startree_query_failed search fields, and search pipeline system_generated fields
0 commit comments