From 2af454899b500bedfd6acdf60994d1fc4f432ed2 Mon Sep 17 00:00:00 2001 From: "Chen, Zhang Z" Date: Mon, 28 Jun 2021 13:35:45 -0400 Subject: [PATCH] IndexRefName compatiable with 7.13.1 For elastic 7.13.1, if we don't add omitempty, the created saved object can not be diplayed in kibana if IndexRefName is not specified. --- search.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/search.go b/search.go index bf01b78..1096eb1 100644 --- a/search.go +++ b/search.go @@ -119,7 +119,7 @@ type SearchKibanaSavedObjectMeta struct { type SearchSource struct { IndexId string `json:"index"` - IndexRefName string `json:"indexRefName"` + IndexRefName string `json:"indexRefName,omitempty"` HighlightAll bool `json:"highlightAll"` Version bool `json:"version"` Query interface{} `json:"query,omitempty"`