/** * Deletes an indexed page. * * @param \Sfynx\CmfBundle\Entity\Page * @return void * @access public * * @author Etienne de Longeaux <*****@*****.**> * @since 2012-06-11 */ public function deletePage(\Sfynx\CmfBundle\Entity\Page $page) { // Open the index self::open($this->_indexPath); // Search for documents with the same route_name. $hits = self::$_index->find('Route:' . $page->getRouteName()); // Delete any documents found. foreach ($hits as $hit) { self::$_index->delete($hit->id); //print_r($hit->getDocument()->Route); //print_r('<br />'); } // Commit the index self::commit(); }