From bac3376278bfd8125879ca86e8eb26df85858d4c Mon Sep 17 00:00:00 2001 From: Christopher Speller Date: Sun, 22 Jul 2018 20:14:05 -0700 Subject: Updating dependencies (#9139) --- .../gopkg.in/olivere/elastic.v5/search_queries_has_parent.go | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'vendor/gopkg.in/olivere/elastic.v5/search_queries_has_parent.go') diff --git a/vendor/gopkg.in/olivere/elastic.v5/search_queries_has_parent.go b/vendor/gopkg.in/olivere/elastic.v5/search_queries_has_parent.go index 7df110cd2..aa46b34c9 100644 --- a/vendor/gopkg.in/olivere/elastic.v5/search_queries_has_parent.go +++ b/vendor/gopkg.in/olivere/elastic.v5/search_queries_has_parent.go @@ -19,6 +19,7 @@ type HasParentQuery struct { score *bool queryName string innerHit *InnerHit + ignoreUnmapped *bool } // NewHasParentQuery creates and initializes a new has_parent query. @@ -55,6 +56,13 @@ func (q *HasParentQuery) InnerHit(innerHit *InnerHit) *HasParentQuery { return q } +// IgnoreUnmapped specifies whether unmapped types should be ignored. +// If set to false, the query failes when an unmapped type is found. +func (q *HasParentQuery) IgnoreUnmapped(ignore bool) *HasParentQuery { + q.ignoreUnmapped = &ignore + return q +} + // Source returns JSON for the function score query. func (q *HasParentQuery) Source() (interface{}, error) { // { @@ -93,5 +101,8 @@ func (q *HasParentQuery) Source() (interface{}, error) { } query["inner_hits"] = src } + if q.ignoreUnmapped != nil { + query["ignore_unmapped"] = *q.ignoreUnmapped + } return source, nil } -- cgit v1.2.3-1-g7c22