code: func (q *PercolatorQuery) Source() (interface{}, error) {
  	if len(q.field) == 0 {
  		return nil, errors.New("elastic: Field is required in PercolatorQuery")
  	}
  
  	// {
  	//   "percolate" : { ... }
  	// }
  	source := make(map[string]interface{})
  	params := make(map[string]interface{})
  	source["percolate"] = params
  	params["field"] = q.field
  	if q.documentType != "" {
  		params["document_type"] = q.documentType
  	}
  	if q.name != "" {
  		params["name"] = q.name
  	}
  
  	switch len(q.documents) {
  	case 0:
  	case 1:
  		params["document"] = q.documents[0]
  	default:
  		params["documents"] = q.documents
  	}
  
  	if s := q.indexedDocumentIndex; s != "" {
  		params["index"] = s
  	}
  	if s := q.indexedDocumentType; s != "" {
  		params["type"] = s
  	}
  	if s := q.indexedDocumentId; s != "" {
  		params["id"] = s
  	}
  	if s := q.indexedDocumentRouting; s != "" {
  		params["routing"] = s
  	}
  	if s := q.indexedDocumentPreference; s != "" {
  		params["preference"] = s
  	}
  	if v := q.indexedDocumentVersion; v != nil {
  		params["version"] = *v
  	}
  	return source, nil
  }
docs: // Source returns JSON for the percolate query.