code: func fetchBuilds(c context.Context, client *bbv1.Service, bid BuilderID,
  	status string, limit int, cursor string) ([]*bbv1.ApiCommonBuildMessage, string, error) {
  
  	c, _ = context.WithTimeout(c, bbRPCTimeout)
  	search := client.Search()
  	search.Context(c)
  	search.Bucket(bid.V1Bucket())
  	search.Status(status)
  	search.Tag(strpair.Format(bbv1.TagBuilder, bid.Builder))
  	search.IncludeExperimental(true)
  	search.StartCursor(cursor)
  
  	if limit < 0 {
  		limit = 100
  	}
  
  	start := clock.Now(c)
  	msgs, cursor, err := search.Fetch(limit, nil)
  	if err != nil {
  		return nil, "", err
  	}
  	logging.Infof(c, "Fetched %d %s builds in %s", len(msgs), status, clock.Since(c, start))
  	return msgs, cursor, nil
  }
docs: // fetchBuilds fetches builds given a criteria.
  // The returned builds are sorted by build creation descending.
  // count defines maximum number of builds to fetch; if <0, defaults to 100.