So every time if some shards fail, I'll get an error json: cannot unmarshal object into Go value of type string from here.
It seems that Reason should be a struct with two string fields type and reason, but I'm not sure if the response format depends on the version of Elasticsearch (currently I'm using 2.2.2).
The field
ShardStatus
ofSearchResult
contains the fieldFailure
which is defined as follows:But actually I got the failure in the response like this when scrolling the results:
So every time if some shards fail, I'll get an error
json: cannot unmarshal object into Go value of type string
from here.It seems that
Reason
should be a struct with two string fieldstype
andreason
, but I'm not sure if the response format depends on the version of Elasticsearch (currently I'm using 2.2.2).