From 83f25ddf31290323a0a9dd72117be65a43705f2f Mon Sep 17 00:00:00 2001 From: Sylvain Baubeau Date: Tue, 25 Oct 2016 15:05:53 +0200 Subject: [PATCH] Handle _parent and _routing attributes in response --- lib/coresearch.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/coresearch.go b/lib/coresearch.go index 0d83c9c9..a0c050da 100644 --- a/lib/coresearch.go +++ b/lib/coresearch.go @@ -204,6 +204,8 @@ type Hit struct { Index string `json:"_index"` Type string `json:"_type,omitempty"` Id string `json:"_id"` + Parent string `json:"_parent,omitempty"` // for parent/child requests + Routing string `json:"_routing,omitempty"` Score Float32Nullable `json:"_score,omitempty"` // Filters (no query) dont have score, so is null Source *json.RawMessage `json:"_source"` // marshalling left to consumer Fields *json.RawMessage `json:"fields"` // when a field arg is passed to ES, instead of _source it returns fields