From 0ac4b7eb0d1ed2b68160022a4c310c2b75cf235a Mon Sep 17 00:00:00 2001 From: Jakob Hahn Date: Wed, 13 Mar 2024 15:28:42 +0100 Subject: [PATCH] opensearchapi: changed cat indices Primary and Replica field to pointer as it can be null Signed-off-by: Jakob Hahn --- CHANGELOG.md | 1 + opensearchapi/api_cat-indices.go | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8f925e9ef..0ecb2e526 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Changed integration tests to work with secure and unsecure opensearch ([#488](https://github.com/opensearch-project/opensearch-go/pull/488)) - Moved functions from opensearch/internal/test to internal/test for more general test uses ([#488](https://github.com/opensearch-project/opensearch-go/pull/488)) - Changed custom_foldername field to pointer as it can be null ([#488](https://github.com/opensearch-project/opensearch-go/pull/488)) +- Changed cat indices Primary and Replica field to pointer as it can be null ([#488](https://github.com/opensearch-project/opensearch-go/pull/488)) ### Deprecated ### Removed ### Fixed diff --git a/opensearchapi/api_cat-indices.go b/opensearchapi/api_cat-indices.go index b1b9152e8..30939cbe3 100644 --- a/opensearchapi/api_cat-indices.go +++ b/opensearchapi/api_cat-indices.go @@ -51,8 +51,8 @@ type CatIndexResp struct { Status string `json:"status"` Index string `json:"index"` UUID string `json:"uuid"` - Primary int `json:"pri,string"` - Replica int `json:"rep,string"` + Primary *int `json:"pri,string"` + Replica *int `json:"rep,string"` DocsCount *int `json:"docs.count,string"` DocDeleted *int `json:"docs.deleted,string"` CreationDate int `json:"creation.date,string"`