[opencms-dev] Lucene Search in xmlcontent special fields

Achim Westermann a.westermann at alkacon.com
Mon Sep 26 17:43:31 CEST 2005


Hi Daniel,

Just map the category value to a property "category" which is currently supported by lucene 
integration. Use CmsSearch.setSearchCategories(..) or CmsSearchParameters.setSearchCategories(..) to 
search for the xmlcontent documents. It will look for this property on documents.

In your xmlcontent schema (*.xsd)
  ...
  <xsd:annotation>
     <xsd:appinfo>
       <resourcebundle name="...."/>
       <mappings>
         <mapping element="myCategory" mapto="property:category" />
         ...


happy coding,

-- 
Achim Westermann
-------------------

Alkacon Software
http://www.alkacon.com

Daniel Wiesner wrote:
> hello,
> 
> I have a content type news with a field "category" (politics, culture 
> ...) . Now I am looking for a way to tell lucene searching for news only 
> having the field "culture" for example.
> 
> regards Daniel
> 
> 
> _______________________________________________
> 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