jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r159359 - incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/search/lucene/SearchIndex.java
Date Tue, 29 Mar 2005 09:38:01 GMT
Author: mreutegg
Date: Tue Mar 29 01:38:00 2005
New Revision: 159359

URL: http://svn.apache.org/viewcvs?view=rev&rev=159359
Log:
JCR-82: Query for all node fails after restart
- disabled indexing of VirtualItemStates as a short term solution

Modified:
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/search/lucene/SearchIndex.java

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/search/lucene/SearchIndex.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/search/lucene/SearchIndex.java?view=diff&r1=159358&r2=159359
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/search/lucene/SearchIndex.java
(original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/search/lucene/SearchIndex.java
Tue Mar 29 01:38:00 2005
@@ -31,6 +31,7 @@
 import org.apache.jackrabbit.core.QName;
 import org.apache.jackrabbit.core.NoPrefixDeclaredException;
 import org.apache.jackrabbit.core.NodeId;
+import org.apache.jackrabbit.core.virtual.VirtualNodeState;
 import org.apache.log4j.Logger;
 import org.apache.lucene.analysis.Analyzer;
 import org.apache.lucene.analysis.standard.StandardAnalyzer;
@@ -361,7 +362,12 @@
         ItemStateManager isMgr = getItemStateProvider();
         for (Iterator it = children.iterator(); it.hasNext();) {
             NodeState.ChildNodeEntry child = (NodeState.ChildNodeEntry) it.next();
-            createIndex((NodeState) isMgr.getItemState(new NodeId(child.getUUID())));
+            NodeState childState = (NodeState) isMgr.getItemState(new NodeId(child.getUUID()));
+            // only traverse if node is not a virtual node state
+            if (!(childState instanceof VirtualNodeState)
+                    && !(childState.getOverlayedState() instanceof VirtualNodeState))
{
+                createIndex(childState);
+            }
         }
     }
 



Mime
View raw message