public function updateIndex()
    {
        $this->startLogging();
        $this->addLog('Indexing start.');
        $this->addLog('Clearing index.');
        $this->resetIndex();
        $this->addLog('Cleaning Published Deleted Documents');
        $this->storage->getDocuments()->cleanPublishedDeletedDocuments();
        $this->addLog('Retrieving documents to be indexed.');
        $documents = $this->storage->getDocuments()->getPublishedDocumentsNoFolders();
        $this->addLog('Start Document Term Count for ' . count($documents) . ' documents');
        $this->createDocumentTermCount($documents);
        $this->addLog('Start Document Term Frequency.');
        $this->createDocumentTermFrequency();
        $this->addLog('Start Term Field Length Norm.');
        $this->createTermFieldLengthNorm();
        $this->addLog('Start Inverse Document Frequency.');
        $this->createInverseDocumentFrequency();
        $this->addLog('Replacing old index.');
        $this->replaceOldIndex();
        $this->addLog('Indexing complete.');
        return $this->log;
    }
public function updateIndex()
    {
        $this->startLogging();
        $this->addLog('Indexing start.');
        $this->addLog('Clearing index.');
        $this->resetIndex();
        $this->addLog('Cleaning Published Deleted Documents');
        $this->storage->getDocuments()->cleanPublishedDeletedDocuments();
        $this->addLog('Retrieving documents to be indexed.');
        $documents = $this->storage->getDocuments()->getPublishedDocumentsNoFolders();
        $this->addLog('Start Document Term Count for ' . count($documents) . ' documents');
        $this->createDocumentTermCount($documents);
        $this->addLog('Start Document Term Frequency.');
        $this->createDocumentTermFrequency();
        $this->addLog('Start Term Field Length Norm.');
        $this->createTermFieldLengthNorm();
        $this->addLog('Start Inverse Document Frequency.');
        $this->createInverseDocumentFrequency();
        $this->addLog('Replacing old index.');
        $this->replaceOldIndex();
        $this->addLog('Indexing complete.');
        return $this->log;
    }
public function updateIndex ( ) { $ this -> startLogging ( ) ; $ this -> addLog ( 'Indexing start.' ) ; $ this -> addLog ( 'Clearing index.' ) ; $ this -> resetIndex ( ) ; $ this -> addLog ( 'Cleaning Published Deleted Documents' ) ; $ this -> storage -> getDocuments ( ) -> cleanPublishedDeletedDocuments ( ) ; $ this -> addLog ( 'Retrieving documents to be indexed.' ) ; $ documents = $ this -> storage -> getDocuments ( ) -> getPublishedDocumentsNoFolders ( ) ; $ this -> addLog ( 'Start Document Term Count for ' . count ( $ documents ) . ' documents' ) ; $ this -> createDocumentTermCount ( $ documents ) ; $ this -> addLog ( 'Start Document Term Frequency.' ) ; $ this -> createDocumentTermFrequency ( ) ; $ this -> addLog ( 'Start Term Field Length Norm.' ) ; $ this -> createTermFieldLengthNorm ( ) ; $ this -> addLog ( 'Start Inverse Document Frequency.' ) ; $ this -> createInverseDocumentFrequency ( ) ; $ this -> addLog ( 'Replacing old index.' ) ; $ this -> replaceOldIndex ( ) ; $ this -> addLog ( 'Indexing complete.' ) ; return $ this -> log ; }
Creates a new temporary search db, cleans it if it exists
then calculates and stores the search index in this db
and finally if indexing completed replaces the current search
db with the temporary one. Returns the log in string format.
@return string
Creates a new temporary search db cleans it if it exists then calculates and stores the search index in this db and finally if indexing completed replaces the current search db with the temporary one . Returns the log in string format .