AnsweredAssumed Answered

web script search returning deleted nodes...

Question asked by mfishm1 on Feb 16, 2010
Latest reply on Dec 22, 2010 by tuty_richard
Hi,

I have a webscript that I am calling through a rest call that makes a call like:

var nodes = search.luceneSearch("TYPE:\"{http://www.mycompany.org/model/myproject/1.0}fileType\"", "cm:created", true);

It has been working for quite a while but, for some reason, I recently got into a situation where this query started returning nodes that already have there node_deleted marked to true.  This caused the following exception:

<exception>org.alfresco.web.scripts.WebScriptException - Wrapped Exception (with status template): Error during processing of the template 'get(name) failed on instance of org.alfresco.repo.template.TempalteNode'.  Please contact your system adminstrator.</exception>
<callstack>
org.alfresco.service.cmr.repository.InvalidNodeRefException:  Node does not exist:  workspace://SpaceStore/2471d2c8-1fdf-4f3b-9421-b36e056506e1
org.alfresco.repo.node.db.DbNodeServiceImpl.getNodePairNotNull(DbNodeServiceImpl.java:156)
org.alfresco.repo.node.db.DbNodeServiceImpl.hasAspect(DbNodeServiceImpl.java:712)


I am currently using alfresco labs 3.0 stable version. 

Could anyone suggest what could cause this problem or a good way to at least detect it and prune those nodes from my list?

Thanks.

Outcomes