[opencms-dev] search in xmlcontent elements

Jason Trump jason.trump at brulant.com
Tue Nov 22 19:30:32 CET 2005


If you are willing to write java code, another possible solution is to write your own I_CmsDocumentFactory class.  The document factory is used to help build the search index, and is responsible for extracting search fields from the input document.  We took this approach so that we could quickly search the contents of a product catalog, and found that it was not very hard to develop.

For example, you can extend org.opencms.search.documents.A_CmsVfsDocument, override the "newInstance" method and add search fields to the returned document (like "author").  You can then specify which resources should use your new document factory in the opencms-search.xml configuration file.

jt

> -----Original Message-----
> From: opencms-dev-bounces at opencms.org [mailto:opencms-dev-
> bounces at opencms.org] On Behalf Of Salvador Santander GutiƩrrez
> Sent: Tuesday, November 22, 2005 1:10 PM
> To: 'The OpenCms mailing list'
> Subject: [opencms-dev] search in xmlcontent elements
> 
> We're evaluating OpenCMS 6 to know if we migrate to the new version of
> OpenCMS (we're actually using version 5).
> I like very much the xmlcontent aproach for manage structured elements,
> but
> I have two doubs about this:
> - It can be possible to run a search based on a field of the xml
> structure?
> For example, if I want to search only the news wich have the author
> "david".
> I think the only solution for this is create a ResourceCollector for this
> porpouse. Is there other solutions?
> - If the answer to the previous question is yes, these kind of search
> seems
> to be very slow, because you have to read all the new elements. Is this
> correct?
> 
> Thanks in advance.
> 
> 
> 
> _______________________________________________
> This mail is send to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://mail.opencms.org/mailman/listinfo/opencms-dev



More information about the opencms-dev mailing list