Class CmsMacroSearchFieldMapping

java.lang.Object
org.opencms.search.fields.CmsMacroSearchFieldMapping
All Implemented Interfaces:
Serializable, I_CmsSearchFieldMapping

Field mapping to resolve macros as for gallery names. The main purpose is to use stringtemplates for special mappings to Solr fields. For this use case, define a parameter (via xsd:annotation/xsd:appinfo/parameters/param and use a stringtemplate as value. In the solr mapping, you just place %(stringtemplate:paramName). Example (there is some element "Type" and in the parameters section of the schema, there's a param "eventKind"):
   <searchsetting element="Type">
     <solrfield targetfield="event-kind" sourcefield="*_s">
       <mapping type="dynamic" class="org.opencms.search.fields.CmsSchemaParameterSearchFieldMapping">%(stringtemplate:eventKind)</mapping>
     </solrfield>
   </searchsetting>
 
See Also: