Example #1
0
 def recover(self):
   if self._mode: raise TarCMS.TarCMSError('already open: %r' % self)
   self._corpus.recover_catalog()
   self.recover_artdb()
   self._indexdb.reset()
   indexer = Indexer(self._indexdb, self._corpus, verbose=verbose)
   for tid in self._corpus.get_all_locs():
     indexer.index_loc(tid)
   indexer.finish()
   return
Example #2
0
 def recover(self):
     if self._mode: raise TarCMS.TarCMSError('already open: %r' % self)
     self._corpus.recover_catalog()
     self.recover_artdb()
     self._indexdb.reset()
     indexer = Indexer(self._indexdb, self._corpus, verbose=verbose)
     for tid in self._corpus.get_all_locs():
         indexer.index_loc(tid)
     indexer.finish()
     return
Example #3
0
 def flush(self):
   if not self._mode: raise TarCMS.TarCMSError('not open: %r' % self)
   self._corpus.flush()
   self._artdb.flush()
   indexer = Indexer(self._indexdb, self._corpus, verbose=self.verbose)
   for tid in self._loctoindex:
     indexer.index_loc(tid)
   indexer.finish()
   self._loctoindex.clear()
   return
Example #4
0
 def flush(self):
     if not self._mode: raise TarCMS.TarCMSError('not open: %r' % self)
     self._corpus.flush()
     self._artdb.flush()
     indexer = Indexer(self._indexdb, self._corpus, verbose=self.verbose)
     for tid in self._loctoindex:
         indexer.index_loc(tid)
     indexer.finish()
     self._loctoindex.clear()
     return