yii\elasticsearch\Query::source PHP Method

source() public method

Sets the source filtering, specifying how the _source field of the document should be returned.
See also: http://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-source-filtering.html
public source ( array $source )
$source array the source patterns to be selected.
    public function source($source)
    {
        if (is_array($source) || $source === null) {
            $this->source = $source;
        } else {
            $this->source = func_get_args();
        }
        return $this;
    }