diff --git a/source/java/org/alfresco/repo/solr/SOLRTrackingComponentImpl.java b/source/java/org/alfresco/repo/solr/SOLRTrackingComponentImpl.java index 1325264ff9..8bc4bd604e 100644 --- a/source/java/org/alfresco/repo/solr/SOLRTrackingComponentImpl.java +++ b/source/java/org/alfresco/repo/solr/SOLRTrackingComponentImpl.java @@ -349,58 +349,7 @@ public class SOLRTrackingComponentImpl implements SOLRTrackingComponent Pair pair = nodeDAO.getNodePair(catRef); for (Path path : nodeDAO.getPaths(pair, false)) { - if ((path.size() > 1) && (path.get(1) instanceof Path.ChildAssocElement)) - { - Path.ChildAssocElement cae = (Path.ChildAssocElement) path.get(1); - boolean isFakeRoot = true; - - final List results = new ArrayList(10); - // We have a callback handler to filter results - ChildAssocRefQueryCallback callback = new ChildAssocRefQueryCallback() - { - public boolean preLoadNodes() - { - return false; - } - - @Override - public boolean orderResults() - { - return false; - } - - public boolean handle( - Pair childAssocPair, - Pair parentNodePair, - Pair childNodePair) - { - results.add(childAssocPair.getSecond()); - return true; - } - - public void done() - { - } - }; - - Pair caePair = nodeDAO.getNodePair(cae.getRef().getChildRef()); - nodeDAO.getParentAssocs(caePair.getFirst(), null, null, false, callback); - for (ChildAssociationRef car : results) - { - if (cae.getRef().equals(car)) - { - isFakeRoot = false; - break; - } - } - if (isFakeRoot) - { - if (path.toString().indexOf(aspDef.getName().toString()) != -1) - { - aspectPaths.add(new Pair(path, aspDef.getName())); - } - } - } + aspectPaths.add(new Pair(path, aspDef.getName())); } } catch (InvalidNodeRefException e)