Last active
August 31, 2015 22:37
-
-
Save islaytitans/15eff73e1f770b390753 to your computer and use it in GitHub Desktop.
Creating a custom DefaultLuceneIndexConfiguration file for Sitecore content search
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/"> | |
<sitecore> | |
<contentSearch> | |
<!-- Name this XML node the name index configuration you are creating --> | |
<wildCards type="Sitecore.ContentSearch.LuceneProvider.LuceneIndexConfiguration, Sitecore.ContentSearch.LuceneProvider"> | |
<!-- Add all required configuration - these can be customised to meet the need --> | |
<indexAllFields>true</indexAllFields> | |
<initializeOnAdd>true</initializeOnAdd> | |
<analyzer ref="contentSearch/indexConfigurations/defaultLuceneIndexConfiguration/analyzer" /> | |
<fieldMap type="Sitecore.ContentSearch.FieldMap, Sitecore.ContentSearch"> | |
<fieldNames hint="raw:AddFieldByFieldName"> | |
<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> | |
</fieldNames> | |
</fieldMap> | |
<fieldReaders ref="contentSearch/indexConfigurations/defaultLuceneIndexConfiguration/fieldReaders"/> | |
<indexFieldStorageValueFormatter ref="contentSearch/indexConfigurations/defaultLuceneIndexConfiguration/indexFieldStorageValueFormatter"/> | |
<indexDocumentPropertyMapper ref="contentSearch/indexConfigurations/defaultLuceneIndexConfiguration/indexDocumentPropertyMapper"/> | |
<!-- Add any Custom Configuration you require --> | |
<!-- Example - I've added the templates I only want indexed | |
via the IncludeTemplate config. You don't have to include this. --> | |
<include hint="list:IncludeTemplate"> | |
<BlogTemplateId>{B7A6247B-AD5B-4A1E-B075-E30AE95DE299}</BlogTemplateId> | |
<EventTemplateId>{37807D72-8647-4224-8190-A1D70882AA1D}</EventTemplateId> | |
<NewsTemplateId>{3A22498D-D119-4F24-92BC-1B4567352328}</NewsTemplateId> | |
</include> | |
</wildCards> | |
</contentSearch> | |
</sitecore> | |
</configuration> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment