From 35591ee82e7bc970deba15fc5cc69d0a15fabe21 Mon Sep 17 00:00:00 2001 From: Jakob Hahn Date: Tue, 27 Aug 2024 16:22:07 +0200 Subject: [PATCH] opensearchapi: add MaxScore field to ScrollGetResp Signed-off-by: Jakob Hahn --- CHANGELOG.md | 1 + opensearchapi/api_scroll-get.go | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b0189b2b3..806aea2a7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ### Added - Adds `Suggest` to `SearchResp` ([#602](https://github.com/opensearch-project/opensearch-go/pull/602)) +- Adds `MaxScore` to `ScrollGetResp` ([#607](https://github.com/opensearch-project/opensearch-go/pull/607)) ### Changed - Split SnapshotGetResp into sub structs ([#603](https://github.com/opensearch-project/opensearch-go/pull/603)) diff --git a/opensearchapi/api_scroll-get.go b/opensearchapi/api_scroll-get.go index 6029705e0..5a6ee7be4 100644 --- a/opensearchapi/api_scroll-get.go +++ b/opensearchapi/api_scroll-get.go @@ -46,8 +46,9 @@ type ScrollGetResp struct { MaxScore float32 `json:"max_score"` Hits []SearchHit `json:"hits"` } `json:"hits"` - ScrollID *string `json:"_scroll_id,omitempty"` - TerminatedEarly bool `json:"terminated_early"` + ScrollID *string `json:"_scroll_id,omitempty"` + TerminatedEarly bool `json:"terminated_early"` + MaxScore *float32 `json:"max_score"` response *opensearch.Response }