Skip to content

Commit

Permalink
Add Highlight to Scroll service
Browse files Browse the repository at this point in the history
See #1181
  • Loading branch information
olivere committed Oct 4, 2019
1 parent e4cd810 commit 37d2b2c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions scroll.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,12 @@ func (s *ScrollService) Size(size int) *ScrollService {
return s
}

// Highlight allows to highlight search results on one or more fields
func (s *ScrollService) Highlight(highlight *Highlight) *ScrollService {
s.ss = s.ss.Highlight(highlight)
return s
}

// Body sets the raw body to send to Elasticsearch. This can be e.g. a string,
// a map[string]interface{} or anything that can be serialized into JSON.
// Notice that setting the body disables the use of SearchSource and many
Expand Down

0 comments on commit 37d2b2c

Please sign in to comment.