Hi Michael and list,<br>
<br>
I need actually deleted (deleted and published), I had to modify another<br>
class for sucess, the class CmsSearchIndex:<br>
<br>
For this:<br>
protected boolean hasReadPermission(CmsObject cms, Document doc) {<br>
return true;<br>
}<br>
<br>
I removed the code below and kept returning always true:<br>
if (!isCheckingPermissions()) {<br>
// no permission check is performed at all<br>
return true;<br>
}<br>
<br>
Fieldable typeField = doc.getFieldable(<div id=":fo" class="ii gt">CmsSearchField.FIELD_TYPE);<br>
Fieldable pathField = doc.getFieldable(CmsSearchField.FIELD_PATH);<br>
if ((typeField == null) || (pathField == null)) {<br>
// permission check needs only to be performed for VFS documents<br>
that contain both fields<br>
return true;<br>
}<br>
<br>
String type = typeField.stringValue();<br>
if<br>
(!CmsSearchFieldConfiguration.VFS_DOCUMENT_KEY_PREFIX.equals(type)<br>
&& !OpenCms.getResourceManager().hasResourceType(type)) {<br>
// this is not a known VFS resource type (also not the generic<br>
"VFS" type of OpenCms before 7.0)<br>
return true;<br>
}<br>
<br>
// check if the resource exits in the VFS,<br>
// this will implicitly check read permission and if the resource<br>
was deleted<br>
String contextPath =<br>
cms.getRequestContext().removeSiteRoot(pathField.stringValue());<br>
return cms.existsResource(contextPath);<br>
<br>
I do not know the side effect of this, but this way I can get files that<br>
were deleted and published the vfs. I tested Luke and Search, and sucess, I<br>
can see files that were deleted also... I have to test to see if I create a<br>
new search index, and choose the CmsVfsIndexer default, will work...<br>
<br>
Kind Regards,<br>
<br>
Deiverson Silveira<br>
SolutionCms<br>
<br>
<br>
<br>
Message: 2<br>
> Date: Tue, 20 Oct 2009 12:07:27 +0200<br>
> From: Michael Moossen <<a href="mailto:m.moossen@alkacon.com">m.moossen@alkacon.com</a>><br>
> Subject: Re: [opencms-dev] Problem for index deleted file vfs in<br>
> search<br>
> To: The OpenCms mailing list <<a href="mailto:opencms-dev@opencms.org">opencms-dev@opencms.org</a>><br>
> Message-ID: <<a href="mailto:4ADD8BDF.1080208@alkacon.com">4ADD8BDF.1080208@alkacon.com</a>><br>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed<br>
><br>
> Hi Deiverson!<br>
><br>
> first, what do you mean by deleted? marked as deleted or actually deleted?<br>
><br>
> then,<br>
> > resources = m_cms.readResources(resourceName,<br>
> > CmsResourceFilter.DEFAULT.addRequireFile());<br>
> this method wont include files MARKED as deleted. if you want to read<br>
> files MARKED as deleted use CmsResourceFilter.ALL instead of<br>
> CmsResourceFilter.DEFAULT.<br>
><br>
> > resourceDeleted =<br>
> > m_cms.readDeletedResources(resourceName,true);<br>
> this method will return resources that no longer exists in VFS but in<br>
> the history, ie. CmsHistoryFile objects instead of CmsResource objects.<br>
> ie. if you do not have the history feature activated there wont be any.<br>
><br>
> HTH<br>
><br>
> -------------------<br>
> Michael Moossen<br>
><br>
> Alkacon Software GmbH - The OpenCms Experts<br>
> <a href="http://www.alkacon.com/" target="_blank">http://www.alkacon.com</a> - <a href="http://www.opencms.org/" target="_blank">http://www.opencms.org</a></div>