Query.php
public function fields($fields)
    {
        if (is_array($fields) || $fields === null) {
            $this->fields = $fields;
        } else {
            $this->fields = func_get_args();
        }
        return $this;
    }
public function fields($fields)
    {
        if (is_array($fields) || $fields === null) {
            $this->fields = $fields;
        } else {
            $this->fields = func_get_args();
        }
        return $this;
    }
public function fields ( $ fields ) { if ( is_array ( $ fields ) || $ fields === null ) { $ this -> fields = $ fields ; } else { $ this -> fields = func_get_args ( ) ; } return $ this ; }
Sets the fields to retrieve from the documents.
@param array $fields the fields to be selected.
@return $this the query object itself
@see http://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-fields.html
Sets the fields to retrieve from the documents .