_index = new Zend_Search_Lucene_Proxy($index); } /** * Convenience function for getting fields from the document * associated with this hit. * * @param string $offset * @return string */ public function __get($offset) { return $this->getDocument()->getFieldValue($offset); } /** * Return the document object for this hit * * @return Zend_Search_Lucene_Document */ public function getDocument() { if (!$this->_document instanceof Zend_Search_Lucene_Document) { $this->_document = $this->_index->getDocument($this->id); } return $this->_document; } /** * Return the index object for this hit * * @return Zend_Search_Lucene_Interface */ public function getIndex() { return $this->_index; } }