From 0963f937acc751a56c26fa1c98b3bb047b57a0a6 Mon Sep 17 00:00:00 2001 From: John Kjellberg Date: Mon, 28 Sep 2015 13:15:18 +0200 Subject: [PATCH] Add "Highlight" field to "Hit" structure. --- structs.go | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/structs.go b/structs.go index ea29437..c726461 100644 --- a/structs.go +++ b/structs.go @@ -145,12 +145,13 @@ type Shard struct { // Represent a hit returned by a search type Hit struct { - Index string `json:"_index"` - Type string `json:"_type"` - Id string `json:"_id"` - Score float64 `json:"_score"` - Source map[string]interface{} `json:"_source"` - Fields map[string]interface{} `json:"fields"` + Index string `json:"_index"` + Type string `json:"_type"` + Id string `json:"_id"` + Score float64 `json:"_score"` + Source map[string]interface{} `json:"_source"` + Highlight map[string]interface{} `json:"highlight"` + Fields map[string]interface{} `json:"fields"` } // Represent the hits structure as returned by elasticsearch