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 introduced inconsistent startree query field naming:
- Used pri.startree.query_current instead of pri.search.startree.query_current
- Used pri.startree.query_time instead of pri.search.startree.query_time
- Used pri.startree.query_total instead of pri.search.startree.query_total
OpenSearch 3.3.0+ corrected this back to the consistent naming pattern.
This creates compatibility issues as applications need different field
names depending on server version.
Solution: Implement dual-field approach with automatic consolidation:
- Stable fields use corrected 3.3.0+ naming as primary
- V32 compatibility fields handle temporary 3.2.0 naming
- consolidateV320StatsFields() method provides transparent fallback logic
- Called automatically in catClient.Indices() after JSON unmarshaling
Applications can use PrimarySearchStartreeQueryCurrent,
PrimarySearchStartreeQueryTime, and PrimarySearchStartreeQueryTotal
consistently regardless of OpenSearch server version.
All compatibility code is marked for removal when 3.2.0 support ends.
Signed-off-by: Sean Chittenden <sean.chittenden@crowdstrike.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
20
20
- Fix OpenSearch 3.2.0+ API compatibility by adding max_last_index_request_timestamp and startree query fields across nodes stats, indices stats, and cat APIs, plus settings field to security plugin health API
21
21
- Fix OpenSearch 3.3.0+ API compatibility by adding neural_search breaker, query_failed and startree_query_failed search fields, search pipeline system_generated fields across multiple APIs, plus ingestion_status field to cluster state API and jwks_uri field to security config API
22
22
- Fix OpenSearch 3.4.0+ API compatibility by adding warmer fields to merges section, parallelism field to thread pool, and status_counter field across multiple APIs
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
+
- Fix cat indices API field naming compatibility across OpenSearch versions by using forward-compatible field names (PrimarySearchStartreeQuery*) that match the corrected 3.3.0+ naming, with fallback support for the temporary 3.2.0 field names
24
24
- Fix cat APIs data type compatibility by changing byte fields from int to string to properly handle values like "0b"
25
25
- Fix floating point precision loss in nodes stats concurrent_avg_slice_count field by changing from float32 to float64
0 commit comments