<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
<pre>Hi Alessio,
In your own indexer class you also have to overwrite the methods newInstance() and rebuildIndex(). You should copy the method org.opencms.search.CmsVfsIndexer.rebuildIndex() and you have to adapt the method org.opencms.search.CmsVfsIndexer.newInstance().
</pre>
<pre class="moz-signature" cols="72">--
Kind Regards,
Mario.
-------------------
Mario Jäger
Alkacon Software GmbH - The OpenCms Experts
<a class="moz-txt-link-freetext" href="http://www.alkacon.com">http://www.alkacon.com</a> - <a class="moz-txt-link-freetext" href="http://www.opencms.org">http://www.opencms.org</a>
</pre>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<title></title>
<pre>Hi Alessio,
With temp files you mean the files, which are there, when an user edits a file and which start with a tilde (~) in the name?
Thereto, you have to implement your own indexer class. This class has to implement the interface org.opencms.search.I_CmsIndexer. But, in your case it is sufficient, that your indexer class extends the class
org.opencms.search.CmsVfsIndexer and overwrites the method updateResource(). You should copy the method org.opencms.search.CmsVfsIndexer.updateResource(). But, you should enhance the check at the beginning of
that method, if a resource shall be updated. Because, the temp files start with a tilde in the name, you should add in your method, that a resource is not updated, if the name of that resource starts with a tilde.
You should add your own indexer class in your own module. And you have to configure your own indexer class for the corresponding index source in the <indexer> node in the WEB-INF/config/opencms-search.xml:
...
<indexsources>
<indexsource>
<name>mysource</name>
<indexer class="mypackage.myIndexer"/>
...
</pre>
<pre class="moz-signature" cols="72">--
Kind Regards,
Mario.
-------------------
Mario Jäger
Alkacon Software GmbH - The OpenCms Experts
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://www.alkacon.com">http://www.alkacon.com</a> - <a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://www.opencms.org">http://www.opencms.org</a> </pre>
<br>
Am 14.10.2010 13:30, schrieb Alessio Raggi:
<blockquote cite="mid:EF03F00A-9ACE-4FD6-819D-AC8C3C7C5FD6@yahoo.it"
type="cite"><span class="Apple-style-span" style="font-size:
medium;"><span>Hi everybody,</span><br>
<span></span><br>
<span>I'm trying to exclude tempfiles from being indexed in
"offline mode" indexes. Is there a way to configure this
behaviour ?</span></span>
<div><span class="Apple-style-span" style="font-size: medium;"><span><br>
</span></span></div>
<div><span class="Apple-style-span" style="font-size: medium;"><span>kind
regards,</span></span></div>
<div><span class="Apple-style-span" style="font-size: medium;"><span><br>
</span></span></div>
<div><span class="Apple-style-span" style="font-size: medium;"><span>Alessio</span></span></div>
<pre wrap=""><fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
This mail is sent to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.opencms.org/mailman/listinfo/opencms-dev">http://lists.opencms.org/mailman/listinfo/opencms-dev</a></pre>
</blockquote>
</body>
</html>