Changeset - b369bec5d468
[Not reviewed]
beta
0 1 0
Marcin Kuzminski - 14 years ago 2011-11-22 13:10:33
marcin@python-works.com
fixes issue with whoosh reindexing files that were removed or renamed
1 file changed with 3 insertions and 2 deletions:
0 comments (0 inline, 0 general)
rhodecode/lib/indexers/daemon.py
Show inline comments
 
@@ -43,7 +43,8 @@ from rhodecode.model.scm import ScmModel
 
from rhodecode.lib import safe_unicode
 
from rhodecode.lib.indexers import INDEX_EXTENSIONS, SCHEMA, IDX_NAME
 

	
 
from vcs.exceptions import ChangesetError, RepositoryError
 
from vcs.exceptions import ChangesetError, RepositoryError, \
 
    NodeDoesNotExistError
 

	
 
from whoosh.index import create_in, open_dir
 

	
 
@@ -198,7 +199,7 @@ class WhooshIndexingDaemon(object):
 

	
 
            try:
 
                node = self.get_node(repo, indexed_path)
 
            except ChangesetError:
 
            except (ChangesetError, NodeDoesNotExistError):
 
                # This file was deleted since it was indexed
 
                log.debug('removing from index %s' % indexed_path)
 
                writer.delete_by_term('path', indexed_path)
0 comments (0 inline, 0 general)