code: func (s *GeoDistanceSort) Source() (interface{}, error) {
  	source := make(map[string]interface{})
  	x := make(map[string]interface{})
  	source["_geo_distance"] = x
  
  	// Points
  	var ptarr []interface{}
  	for _, pt := range s.points {
  		ptarr = append(ptarr, pt.Source())
  	}
  	for _, geohash := range s.geohashes {
  		ptarr = append(ptarr, geohash)
  	}
  	x[s.fieldName] = ptarr
  
  	if s.unit != "" {
  		x["unit"] = s.unit
  	}
  	if s.distanceType != nil {
  		x["distance_type"] = *s.distanceType
  	}
  
  	if s.ascending {
  		x["order"] = "asc"
  	} else {
  		x["order"] = "desc"
  	}
  	if s.sortMode != nil {
  		x["mode"] = *s.sortMode
  	}
  	if s.nestedFilter != nil {
  		src, err := s.nestedFilter.Source()
  		if err != nil {
  			return nil, err
  		}
  		x["nested_filter"] = src
  	}
  	if s.nestedPath != nil {
  		x["nested_path"] = *s.nestedPath
  	}
  	if s.nestedSort != nil {
  		src, err := s.nestedSort.Source()
  		if err != nil {
  			return nil, err
  		}
  		x["nested"] = src
  	}
  	return source, nil
  }
docs: // Source returns the JSON-serializable data.