Profile maps for Lucene and Solr

Current version: 8.2

Due to the dynamic nature of the Commerce Server profile indexing strategy, the field map is generated dynamically. You do not have to define the fields in configuration. The fields will be added automatically through field map providers.

By default, both Lucene and Solr field map providers have been added.

You can bypass the field map providers and manually add the fields to be indexed in configuration. Do this by replacing the configuration section of the index definition with the default technology specific Sitecore field map provider.

The following profile field map providers are available for Lucene and Solr:

  • ProfileLuceneFieldMap

  • ProfileSolrFieldMap

The following is an example of the Lucene user profiles index definition. For clarity, configuration elements not related to this configuration have been removed.

        <param desc="profileType">UserObject</param>
        <param desc="additionalFields">_content</param>

The fieldMap element tells Sitecore which profile map provider to use. By default, Sitecore uses the Commerce Server Connect profile map provider. If you wish to define the fields manually, you can simply change the fieldMap type to the default Sitecore version. For example: <fieldMap type="Sitecore.ContentSearch.FieldMap, Sitecore.ContentSearch">

At this point, you will be required to define the field map profile fields manually in configuration.

<fieldMap type="Sitecore.ContentSearch.FieldMap, Sitecore.ContentSearch">
    <fieldNames hint="raw:AddFieldByFieldName">
        <field fieldName="email_address"  storageType="YES" indexType="TOKENIZED" 
               vectorType="NO" boost="1f" type="System.String" 
              LuceneSearchFieldConfiguration, Sitecore.ContentSearch.LuceneProvider">
             LowerCaseKeywordAnalyzer, Sitecore.ContentSearch.LuceneProvider" />

The same type of configuration exists for Solr.

Do you have some feedback for us?

If you have suggestions for improving this article,