code: func (q *IdsQuery) Source() (interface{}, error) {
  	// {
  	//	"ids" : {
  	//		"type" : "my_type",
  	//		"values" : ["1", "4", "100"]
  	//	}
  	// }
  
  	source := make(map[string]interface{})
  	query := make(map[string]interface{})
  	source["ids"] = query
  
  	// type(s)
  	if len(q.types) == 1 {
  		query["type"] = q.types[0]
  	} else if len(q.types) > 1 {
  		query["types"] = q.types
  	}
  
  	// values
  	query["values"] = q.values
  
  	if q.boost != nil {
  		query["boost"] = *q.boost
  	}
  	if q.queryName != "" {
  		query["_name"] = q.queryName
  	}
  
  	return source, nil
  }
docs: // Source returns JSON for the function score query.