[opencms-dev] Search doesn't find indexed xmlcontent content

Ernesto De Santis opencms at colaborativa.net
Thu Feb 2 16:42:43 CET 2006


Hi Alessandro

We have the same problem, and we can fix it in my project. But, we don't
know what happen exactly, because me and another developer touch
different things and then work.

Try with this:

First add your custom type to the xmlcontent factory in opencms-search.xml:

For example, if your custom xmlcontent is named "myxmlcontent".

<documenttype>
	<name>xmlcontent</name>
	<class>org.opencms.search.documents.CmsDocumentXmlContent</class>
	<mimetypes/>
	<resourcetypes>
		<resourcetype>*</resourcetype>
		<resourcetype>myxmlcontent</resourcetype>
	</resourcetypes>
</documenttype>

Restart context, index and try search again.

I debug the indexation of custom xmlcontent, and see that use another
DocumentFactory. Don't use CmsDocumentXmlContent, use CmsDocumentGeneric.

  - The another "fix"

Add the <properties> tags to your type definition, in 
opencms-modules.xml (or in opencms-vfs.xml and opencms-workplace.xml)

<resourcetypes>
    <type class="...

       <properties>
           <property>
	      <name>content-conversion</name>
               <value type="shared">
                  <![CDATA[cleanup;xhtml]]>
               </value>
           </property>
       </properties>

    </type>
</resourcetypes>

Good luck!
If you found which is the real fix to it, please post in this list.

Thanks.
Ernesto.


Alessandro Magnolo escribió:
> Has anybody found a solution for the problem of indexing xmlcontent files?
> 
> I'm using the default opencms-search and the administration search
> utility (to rule out possible errors in my search page).
> When I publish the project, both registered xmlcontent (for example an
> "article" instance) and my custom xmlcontent are indexed, according to
> the log window.
> However, when I do a search, registered xmlcontent results are shown,
> while custom xmlcontent are ignored.
> 
> I don't know if I should mess with the opencms-search.xml
> configuration, or rather register my custom xmlcontent...
> 
> Thanks to anyone who can help.
> Alessandro Magnolo
> 
> On 11/29/05, Alejandro Alberola <alberola at bio.es> wrote:
> 
>>Hello,
>>
>>I have created a new index for my site in
>>opencms-search.xml and all my content is
>>being indexed properly but my custom
>>xmlcontent isn't.
>>
>>Any idea ?
>>
>>
> 
> 
> _______________________________________________
> 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
> http://lists.opencms.org/mailman/listinfo/opencms-dev
> 
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: opencms.vcf
Type: text/x-vcard
Size: 145 bytes
Desc: not available
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20060202/3f0416db/attachment.vcf>


More information about the opencms-dev mailing list