diff --git a/.github/workflows/test-compatibility.yml b/.github/workflows/test-compatibility.yml index da7ee32ad..db8568073 100644 --- a/.github/workflows/test-compatibility.yml +++ b/.github/workflows/test-compatibility.yml @@ -27,6 +27,7 @@ jobs: - { opensearch_version: 2.11.1 } - { opensearch_version: 2.12.0 } - { opensearch_version: 2.13.0 } + - { opensearch_version: 2.14.0 } steps: - uses: actions/checkout@v4 diff --git a/CHANGELOG.md b/CHANGELOG.md index 9f648eea2..132bbcd9d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,8 +6,8 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ### Added - Adds the `Routing` field in SearchHit interface. ([#516](https://github.com/opensearch-project/opensearch-go/pull/516)) - - Adds the `SearchPipelines` field to `SearchParams` ([#532](https://github.com/opensearch-project/opensearch-go/pull/532)) +- Adds support for OpenSearch 2.14 ([#552](https://github.com/opensearch-project/opensearch-go/pull/552)) ### Changed diff --git a/opensearchapi/api_cat-shards.go b/opensearchapi/api_cat-shards.go index acc3ee477..bcbb1ef3e 100644 --- a/opensearchapi/api_cat-shards.go +++ b/opensearchapi/api_cat-shards.go @@ -47,85 +47,86 @@ type CatShardsResp struct { // CatShardResp represents one index of the CatShardsResp type CatShardResp struct { - Index string `json:"index"` - Shard int `json:"shard,string"` - Prirep string `json:"prirep"` - State string `json:"state"` - Docs *string `json:"docs"` - Store *string `json:"store"` - IP *string `json:"ip"` - ID *string `json:"id"` - Node *string `json:"node"` - SyncID *string `json:"sync_id"` - UnassignedReason *string `json:"unassigned.reason"` - UnassignedAt *string `json:"unassigned.at"` - UnassignedFor *string `json:"unassigned.for"` - UnassignedDetails *string `json:"unassigned.details"` - RecoverysourceType *string `json:"recoverysource.type"` - CompletionSize *string `json:"completion.size"` - FielddataMemorySize *string `json:"fielddata.memory_size"` - FielddataEvictions *int `json:"fielddata.evictions,string"` - QueryCacheMemorySize *string `json:"query_cache.memory_size"` - QueryCacheEvictions *int `json:"query_cache.evictions,string"` - FlushTotal *int `json:"flush.total,string"` - FlushTotalTime *string `json:"flush.total_time"` - GetCurrent *int `json:"get.current,string"` - GetTime *string `json:"get.time"` - GetTotal *int `json:"get.total,string"` - GetExistsTime *string `json:"get.exists_time"` - GetExistsTotal *int `json:"get.exists_total,string"` - GetMissingTime *string `json:"get.missing_time"` - GetMissingTotal *int `json:"get.missing_total,string"` - IndexingDeleteCurrent *int `json:"indexing.delete_current,string"` - IndexingDeleteTime *string `json:"indexing.delete_time"` - IndexingDeleteTotal *string `json:"indexing.delete_total"` - IndexingIndexCurrent *int `json:"indexing.index_current,string"` - IndexingIndexTime *string `json:"indexing.index_time"` - IndexingIndexTotal *int `json:"indexing.index_total,string"` - IndexingIndexFailed *int `json:"indexing.index_failed,string"` - MergesCurrent *int `json:"merges.current,string"` - MergesCurrentDocs *int `json:"merges.current_docs,string"` - MergesCurrentSize *string `json:"merges.current_size"` - MergesTotal *int `json:"merges.total,string"` - MergesTotalDocs *int `json:"merges.total_docs,string"` - MergesTotalSize *string `json:"merges.total_size"` - MergesTotalTime *string `json:"merges.total_time"` - RefreshTotal *int `json:"refresh.total,string"` - RefreshTime *string `json:"refresh.time"` - RefreshExternalTotal *int `json:"refresh.external_total,string"` - RefreshExternalTime *string `json:"refresh.external_time"` - RefreshListeners *int `json:"refresh.listeners,string"` - SearchFetchCurrent *int `json:"search.fetch_current,string"` - SearchFetchTime *string `json:"search.fetch_time"` - SearchFetchTotal *int `json:"search.fetch_total,string"` - SearchOpenContexts *int `json:"search.open_contexts,string"` - SearchQueryCurrent *int `json:"search.query_current,string"` - SearchQueryTime *string `json:"search.query_time"` - SearchQueryTotal *int `json:"search.query_total,string"` - SearchConcurrentQueryCurrent *int `json:"search.concurrent_query_current,string"` - SearchConcurrentQueryTime *string `json:"search.concurrent_query_time"` - SearchConcurrentQueryTotal *int `json:"search.concurrent_query_total,string"` - SearchConcurrentAvgSliceCount *string `json:"search.concurrent_avg_slice_count"` - SearchScrollCurrent *int `json:"search.scroll_current,string"` - SearchScrollTime *string `json:"search.scroll_time"` - SearchScrollTotal *int `json:"search.scroll_total,string"` - SearchPointInTimeCurrent *int `json:"search.point_in_time_current,string"` - SearchPointInTimeTime *string `json:"search.point_in_time_time"` - SearchPointInTimeTotal *int `json:"search.point_in_time_total,string"` - SegmentsCount *int `json:"segments.count,string"` - SegmentsMemory *string `json:"segments.memory"` - SegmentsIndexWriterMemory *string `json:"segments.index_writer_memory"` - SegmentsVersionMapMemory *string `json:"segments.version_map_memory"` - SegmentsFixedBitsetMemory *string `json:"segments.fixed_bitset_memory"` - SeqNoMax *int `json:"seq_no.max,string"` - SeqNoLocalCheckpoint *int `json:"seq_no.local_checkpoint,string"` - SeqNoGlobalCheckpoint *int `json:"seq_no.global_checkpoint,string"` - WarmerCurrent *int `json:"warmer.current,string"` - WarmerTotal *int `json:"warmer.total,string"` - WarmerTotalTime *string `json:"warmer.total_time"` - PathData *string `json:"path.data"` - PathState *string `json:"path.state"` - DocsDeleted *int `json:"docs.deleted,string"` + Index string `json:"index"` + Shard int `json:"shard,string"` + Prirep string `json:"prirep"` + State string `json:"state"` + Docs *string `json:"docs"` + Store *string `json:"store"` + IP *string `json:"ip"` + ID *string `json:"id"` + Node *string `json:"node"` + SyncID *string `json:"sync_id"` + UnassignedReason *string `json:"unassigned.reason"` + UnassignedAt *string `json:"unassigned.at"` + UnassignedFor *string `json:"unassigned.for"` + UnassignedDetails *string `json:"unassigned.details"` + RecoverysourceType *string `json:"recoverysource.type"` + CompletionSize *string `json:"completion.size"` + FielddataMemorySize *string `json:"fielddata.memory_size"` + FielddataEvictions *int `json:"fielddata.evictions,string"` + QueryCacheMemorySize *string `json:"query_cache.memory_size"` + QueryCacheEvictions *int `json:"query_cache.evictions,string"` + FlushTotal *int `json:"flush.total,string"` + FlushTotalTime *string `json:"flush.total_time"` + GetCurrent *int `json:"get.current,string"` + GetTime *string `json:"get.time"` + GetTotal *int `json:"get.total,string"` + GetExistsTime *string `json:"get.exists_time"` + GetExistsTotal *int `json:"get.exists_total,string"` + GetMissingTime *string `json:"get.missing_time"` + GetMissingTotal *int `json:"get.missing_total,string"` + IndexingDeleteCurrent *int `json:"indexing.delete_current,string"` + IndexingDeleteTime *string `json:"indexing.delete_time"` + IndexingDeleteTotal *string `json:"indexing.delete_total"` + IndexingIndexCurrent *int `json:"indexing.index_current,string"` + IndexingIndexTime *string `json:"indexing.index_time"` + IndexingIndexTotal *int `json:"indexing.index_total,string"` + IndexingIndexFailed *int `json:"indexing.index_failed,string"` + MergesCurrent *int `json:"merges.current,string"` + MergesCurrentDocs *int `json:"merges.current_docs,string"` + MergesCurrentSize *string `json:"merges.current_size"` + MergesTotal *int `json:"merges.total,string"` + MergesTotalDocs *int `json:"merges.total_docs,string"` + MergesTotalSize *string `json:"merges.total_size"` + MergesTotalTime *string `json:"merges.total_time"` + RefreshTotal *int `json:"refresh.total,string"` + RefreshTime *string `json:"refresh.time"` + RefreshExternalTotal *int `json:"refresh.external_total,string"` + RefreshExternalTime *string `json:"refresh.external_time"` + RefreshListeners *int `json:"refresh.listeners,string"` + SearchFetchCurrent *int `json:"search.fetch_current,string"` + SearchFetchTime *string `json:"search.fetch_time"` + SearchFetchTotal *int `json:"search.fetch_total,string"` + SearchOpenContexts *int `json:"search.open_contexts,string"` + SearchQueryCurrent *int `json:"search.query_current,string"` + SearchQueryTime *string `json:"search.query_time"` + SearchQueryTotal *int `json:"search.query_total,string"` + SearchConcurrentQueryCurrent *int `json:"search.concurrent_query_current,string"` + SearchConcurrentQueryTime *string `json:"search.concurrent_query_time"` + SearchConcurrentQueryTotal *int `json:"search.concurrent_query_total,string"` + SearchConcurrentAvgSliceCount *string `json:"search.concurrent_avg_slice_count"` + SearchScrollCurrent *int `json:"search.scroll_current,string"` + SearchScrollTime *string `json:"search.scroll_time"` + SearchScrollTotal *int `json:"search.scroll_total,string"` + SearchPointInTimeCurrent *int `json:"search.point_in_time_current,string"` + SearchPointInTimeTime *string `json:"search.point_in_time_time"` + SearchPointInTimeTotal *int `json:"search.point_in_time_total,string"` + SearchIdleReactivateCountTotal *int `json:"search.search_idle_reactivate_count_total,string"` + SegmentsCount *int `json:"segments.count,string"` + SegmentsMemory *string `json:"segments.memory"` + SegmentsIndexWriterMemory *string `json:"segments.index_writer_memory"` + SegmentsVersionMapMemory *string `json:"segments.version_map_memory"` + SegmentsFixedBitsetMemory *string `json:"segments.fixed_bitset_memory"` + SeqNoMax *int `json:"seq_no.max,string"` + SeqNoLocalCheckpoint *int `json:"seq_no.local_checkpoint,string"` + SeqNoGlobalCheckpoint *int `json:"seq_no.global_checkpoint,string"` + WarmerCurrent *int `json:"warmer.current,string"` + WarmerTotal *int `json:"warmer.total,string"` + WarmerTotalTime *string `json:"warmer.total_time"` + PathData *string `json:"path.data"` + PathState *string `json:"path.state"` + DocsDeleted *int `json:"docs.deleted,string"` } // Inspect returns the Inspect type containing the raw *opensearch.Reponse diff --git a/opensearchapi/api_indices-stats.go b/opensearchapi/api_indices-stats.go index 1a7d55930..e5e4dff8a 100644 --- a/opensearchapi/api_indices-stats.go +++ b/opensearchapi/api_indices-stats.go @@ -129,6 +129,7 @@ type IndicesStatsSearch struct { SuggestTotal int `json:"suggest_total"` SuggestTimeInMillis int `json:"suggest_time_in_millis"` SuggestCurrent int `json:"suggest_current"` + IdleReactivateCountTotal int `json:"search_idle_reactivate_count_total"` } // IndicesStatsMerges is a sub type of IndicesStatsInfo containing stats about index merges diff --git a/opensearchapi/api_nodes-stats.go b/opensearchapi/api_nodes-stats.go index 30a7a66f5..9f88916bf 100644 --- a/opensearchapi/api_nodes-stats.go +++ b/opensearchapi/api_nodes-stats.go @@ -166,6 +166,7 @@ type NodesStatsIndices struct { SuggestTotal int `json:"suggest_total"` SuggestTimeInMillis int `json:"suggest_time_in_millis"` SuggestCurrent int `json:"suggest_current"` + IdleReactivateCountTotal int `json:"search_idle_reactivate_count_total"` Request struct { DfsPreQuery NodesStatsIndicesSearchRequest `json:"dfs_pre_query"` Query NodesStatsIndicesSearchRequest `json:"query"` diff --git a/plugins/security/api_securityconfig-get.go b/plugins/security/api_securityconfig-get.go index 9c26e8e7d..f537c3d4e 100644 --- a/plugins/security/api_securityconfig-get.go +++ b/plugins/security/api_securityconfig-get.go @@ -64,11 +64,12 @@ type ConfigDynamic struct { // ConfigDynamicKibana is a sub type of ConfigDynamic containing security settings for kibana type ConfigDynamicKibana struct { - MultitenancyEnabled bool `json:"multitenancy_enabled"` - PrivateTenantEnabled *bool `json:"private_tenant_enabled,omitempty"` - DefaultTenant *string `json:"default_tenant,omitempty"` - ServerUsername string `json:"server_username"` - Index string `json:"index"` + MultitenancyEnabled bool `json:"multitenancy_enabled"` + PrivateTenantEnabled *bool `json:"private_tenant_enabled,omitempty"` + DefaultTenant *string `json:"default_tenant,omitempty"` + ServerUsername string `json:"server_username"` + Index string `json:"index"` + SignInOptions []string `json:"sign_in_options,omitempty"` } // ConfigDynamicHTTP is a sub type of ConfigDynamic containing security settings for HTTP