code: func (r *SearchResult) TotalHits() int64 {
  	if r.Hits != nil && r.Hits.TotalHits != nil {
  		return r.Hits.TotalHits.Value
  	}
  	return 0
  }
docs: // TotalHits is a convenience function to return the number of hits for
  // a search result. The return value might not be accurate, unless
  // track_total_hits parameter has set to true.