Hi Alex and List,<br><br>I'm trying index deleted files, I can list files, and show me in moment with rebuild but, <span dir="ltr" id=":5x">when I try to not look files.<br><br>I'm custom function rebuildIndex in class CmsVfsIndexerDeletedFiles:<br>
<br>public void rebuildIndex(IndexWriter writer, CmsIndexingThreadManager threadManager, CmsSearchIndexSource source)<br> throws CmsIndexException {<br> System.out.println("Entrou no RebuildIndex");<br> List resourceNames = source.getResourcesNames();<br>
Iterator i = resourceNames.iterator();<br> while (i.hasNext()) {<br> // read the resources from all configured source folders<br> String resourceName = (String)i.next();<br> List resources = null;<br>
List resourceDeleted = null;<br> try {<br> // read all resources (only files) below the given path<br> resources = m_cms.readResources(resourceName, CmsResourceFilter.DEFAULT.addRequireFile());<br>
// read resource deleted and add in List<br> resourceDeleted = m_cms.readDeletedResources(resourceName,true);</span><span dir="ltr" id=":5x">//
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<</span><br><span dir="ltr" id=":5x"><br>
} catch (CmsException e) {<br> System.out.println("Entrou CmsException");<br> if (m_report != null) {<br> System.out.println("Entrou CmsException 1");<br>
m_report.println(Messages.get().container(<br> Messages.RPT_UNABLE_TO_READ_SOURCE_2,<br> resourceName,<br> e.getLocalizedMessage()), I_CmsReport.FORMAT_WARNING);<br>
}<br> if (LOG.isWarnEnabled()) {<br> System.out.println("Entrou CmsException 2");<br> LOG.warn(Messages.get().getBundle().key(<br> Messages.LOG_UNABLE_TO_READ_SOURCE_2,<br>
resourceName,<br> m_index.getName()), e);<br> }<br> }<br> if (resources != null) {<br> // iterate all resources found in the folder<br>
Iterator j = resources.iterator();<br> while (j.hasNext()) {<br> // now update all the resources individually<br> CmsResource resource = (CmsResource)j.next();<br>
updateResource(writer, threadManager, resource);<br> }<br> }<br> if (resourceDeleted != null) {<br> // iterate all resources found in the folder<br> Iterator j = resourceDeleted.iterator();<br>
while (j.hasNext()) {<br> // now update resource deleted<br> CmsResource resource = (CmsResource)j.next();<br> updateResource(writer, threadManager, resource); // <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< <br>
}<br> }<br> }<br> }<br><br>But result dont work, i tested wirh Luke, dont sucess, </span><span dir="ltr" id=":5x">you can tell me what is missing I can do to perform search with deleted files?<br>
<br></span><span dir="ltr" id=":5x">Thanks for any help and </span><span dir="ltr" id=":5x">Kind Regards,<br><br>Deiverson Silveira<br></span>