[Yanel-dev] [Bug 6573] (vfs) when deleting a node it will not
remove the node from the search index.
bugzilla at wyona.com
bugzilla at wyona.com
Tue Jun 1 15:33:40 CEST 2010
http://bugzilla.wyona.com/cgi-bin/bugzilla/show_bug.cgi?id=6573
------- Comment #3 from michael.wechner at wyona.org 2010-06-01 14:25 -------
Index: src/impl/java/org/wyona/yarep/impl/repo/vfs/VirtualFileSystemNode.java
===================================================================
--- src/impl/java/org/wyona/yarep/impl/repo/vfs/VirtualFileSystemNode.java
(revision 50053)
+++ src/impl/java/org/wyona/yarep/impl/repo/vfs/VirtualFileSystemNode.java
(working copy)
@@ -514,7 +514,10 @@
public void delete() throws RepositoryException {
deleteRec(this);
}
-
+
+ /**
+ * Delete node recursively
+ */
protected void deleteRec(Node node) throws RepositoryException {
Node[] children = node.getNodes();
for (int i=0; i < children.length; i++) {
@@ -532,6 +535,13 @@
throw new RepositoryException("Could not delete node: " +
node.getPath() + ": " +
e.toString(), e);
}
+
+ // INFO: Delete node from fulltext search index
+ try {
+ getRepository().getIndexer().removeFromIndex(this);
+ } catch(Exception e) {
+ log.error(e, e);
+ }
}
/**
--
Configure bugmail: http://bugzilla.wyona.com/cgi-bin/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.
More information about the Yanel-development
mailing list