lib/Elastica/Result.php
public function getDocument()
    {
        $doc = new Document();
        $doc->setData($this->getSource());
        $hit = $this->getHit();
        unset($hit['_source']);
        unset($hit['_explanation']);
        unset($hit['highlight']);
        unset($hit['_score']);
        $doc->setParams($hit);

        return $doc;
    }
public function getDocument()
    {
        $doc = new Document();
        $doc->setData($this->getSource());
        $hit = $this->getHit();
        unset($hit['_source']);
        unset($hit['_explanation']);
        unset($hit['highlight']);
        unset($hit['_score']);
        $doc->setParams($hit);

        return $doc;
    }
public function getDocument ( ) { $ doc = new Document ( ) ; $ doc -> setData ( $ this -> getSource ( ) ) ; $ hit = $ this -> getHit ( ) ; unset ( $ hit [ '_source' ] ) ; unset ( $ hit [ '_explanation' ] ) ; unset ( $ hit [ 'highlight' ] ) ; unset ( $ hit [ '_score' ] ) ; $ doc -> setParams ( $ hit ) ; return $ doc ; }
Returns Document.

@return Document
Returns Document .