code: func (s *SearchService) Do(ctx context.Context) (*SearchResult, error) {
  	// Check pre-conditions
  	if err := s.Validate(); err != nil {
  		return nil, err
  	}
  
  	// Get URL for request
  	path, params, err := s.buildURL()
  	if err != nil {
  		return nil, err
  	}
  
  	// Perform request
  	var body interface{}
  	if s.source != nil {
  		body = s.source
  	} else {
  		src, err := s.searchSource.Source()
  		if err != nil {
  			return nil, err
  		}
  		body = src
  	}
  	res, err := s.client.PerformRequest(ctx, PerformRequestOptions{
  		Method:          "POST",
  		Path:            path,
  		Params:          params,
  		Body:            body,
  		MaxResponseSize: s.maxResponseSize,
  	})
  	if err != nil {
  		return nil, err
  	}
  
  	// Return search results
  	ret := new(SearchResult)
  	if err := s.client.decoder.Decode(res.Body, ret); err != nil {
  		return nil, err
  	}
  	return ret, nil
  }
docs: // Do executes the search and returns a SearchResult.