diff options
Diffstat (limited to 'vendor/gopkg.in/olivere/elastic.v5/highlight.go')
-rw-r--r-- | vendor/gopkg.in/olivere/elastic.v5/highlight.go | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/vendor/gopkg.in/olivere/elastic.v5/highlight.go b/vendor/gopkg.in/olivere/elastic.v5/highlight.go index d28f03c3a..6d8d2ba63 100644 --- a/vendor/gopkg.in/olivere/elastic.v5/highlight.go +++ b/vendor/gopkg.in/olivere/elastic.v5/highlight.go @@ -6,7 +6,7 @@ package elastic // Highlight allows highlighting search results on one or more fields. // For details, see: -// https://www.elastic.co/guide/en/elasticsearch/reference/5.2/search-request-highlighting.html +// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-request-highlighting.html type Highlight struct { fields []*HighlighterField tagsSchema *string @@ -20,6 +20,8 @@ type Highlight struct { requireFieldMatch *bool boundaryMaxScan *int boundaryChars *string + boundaryScannerType *string + boundaryScannerLocale *string highlighterType *string fragmenter *string highlightQuery Query @@ -103,6 +105,16 @@ func (hl *Highlight) BoundaryChars(boundaryChars string) *Highlight { return hl } +func (hl *Highlight) BoundaryScannerType(boundaryScannerType string) *Highlight { + hl.boundaryScannerType = &boundaryScannerType + return hl +} + +func (hl *Highlight) BoundaryScannerLocale(boundaryScannerLocale string) *Highlight { + hl.boundaryScannerLocale = &boundaryScannerLocale + return hl +} + func (hl *Highlight) HighlighterType(highlighterType string) *Highlight { hl.highlighterType = &highlighterType return hl @@ -178,6 +190,12 @@ func (hl *Highlight) Source() (interface{}, error) { if hl.boundaryChars != nil { source["boundary_chars"] = *hl.boundaryChars } + if hl.boundaryScannerType != nil { + source["boundary_scanner"] = *hl.boundaryScannerType + } + if hl.boundaryScannerLocale != nil { + source["boundary_scanner_locale"] = *hl.boundaryScannerLocale + } if hl.highlighterType != nil { source["type"] = *hl.highlighterType } |