code: func (b *SearchRequestBuilder) Build() (*SearchRequest, error) {
  	sr := SearchRequest{
  		Index:       b.index,
  		Interval:    b.interval,
  		Size:        b.size,
  		Sort:        b.sort,
  		CustomProps: b.customProps,
  	}
  
  	if b.queryBuilder != nil {
  		q, err := b.queryBuilder.Build()
  		if err != nil {
  			return nil, err
  		}
  		sr.Query = q
  	}
  
  	if len(b.aggBuilders) > 0 {
  		sr.Aggs = make(AggArray, 0)
  
  		for _, ab := range b.aggBuilders {
  			aggArray, err := ab.Build()
  			if err != nil {
  				return nil, err
  			}
  			sr.Aggs = append(sr.Aggs, aggArray...)
  		}
  	}
  
  	return &sr, nil
  }
docs: // Build builds and return a search request