From 5e618e3b40270a09cf32347ab15f153ed4941dd1 Mon Sep 17 00:00:00 2001 From: bibinbin <18730590865@163.com> Date: Mon, 30 May 2016 20:40:25 +0800 Subject: [PATCH] Update baseresponse.go Hello, when I use elastigo found inside the package is the core of search methods. When the result of elasticsearch returned and the reason is that this field appears when the field is not a string type, will json Unmarshal error occurs, I will reason the string replaced json.RawMessage, solves this problem. --- lib/baseresponse.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/baseresponse.go b/lib/baseresponse.go index 41770dfa..b1a14fb8 100644 --- a/lib/baseresponse.go +++ b/lib/baseresponse.go @@ -94,7 +94,7 @@ type Status struct { type Failure struct { Index string `json:"index"` Shard StatusInt `json:"shard"` - Reason string `json:"reason"` + Reason json.RawMessage `json:"reason"` } func (f Failure) String() string {