Skip to content

Instantly share code, notes, and snippets.

@lowedown
Created August 9, 2014 22:04
Show Gist options
  • Save lowedown/f53a42fdd34e3f67334f to your computer and use it in GitHub Desktop.
Save lowedown/f53a42fdd34e3f67334f to your computer and use it in GitHub Desktop.
Minimal FieldMap Configuration
<fieldMap type="Sitecore.ContentSearch.FieldMap, Sitecore.ContentSearch">
<fieldNames hint="raw:AddFieldByFieldName">
<!-- Add custom fields here -->
<field fieldName="MyCustomField" storageType="YES" indexType="TOKENIZED" vectorType="NO" boost="4f" type="System.String" settingType="Sitecore.ContentSearch.LuceneProvider.LuceneSearchFieldConfiguration, Sitecore.ContentSearch.LuceneProvider" />
<!-- System fields to allow correct mapping -->
<field fieldName="_uniqueid" storageType="YES" indexType="TOKENIZED" vectorType="NO" boost="1f" type="System.String" settingType="Sitecore.ContentSearch.LuceneProvider.LuceneSearchFieldConfiguration, Sitecore.ContentSearch.LuceneProvider">
<analyzer type="Sitecore.ContentSearch.LuceneProvider.Analyzers.LowerCaseKeywordAnalyzer, Sitecore.ContentSearch.LuceneProvider" />
</field>
<!-- If filtering by template -->
<field fieldName="_template" storageType="YES" indexType="TOKENIZED" vectorType="NO" boost="1f" type="System.GUID" settingType="Sitecore.ContentSearch.LuceneProvider.LuceneSearchFieldConfiguration, Sitecore.ContentSearch.LuceneProvider">
<Analyzer type="Sitecore.ContentSearch.LuceneProvider.Analyzers.LowerCaseKeywordAnalyzer, Sitecore.ContentSearch.LuceneProvider" />
</field>
</fieldNames>
</fieldMap>
@lowedown
Copy link
Author

Make sure every GUID field used goes through the LowerCaseKeywordAnalyzer!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment