Created
October 30, 2015 15:24
-
-
Save lowedown/7cc68e593d184ed41e71 to your computer and use it in GitHub Desktop.
Minimal Sitecore Index configuration with language
This file contains hidden or 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
<myLanguageSearchConfiguration type="Sitecore.ContentSearch.LuceneProvider.LuceneIndexConfiguration, Sitecore.ContentSearch.LuceneProvider"> | |
<indexAllFields>false</indexAllFields> | |
<initializeOnAdd>true</initializeOnAdd> | |
<analyzer ref="contentSearch/indexConfigurations/defaultLuceneIndexConfiguration/analyzer" /> | |
<fieldMap type="Sitecore.ContentSearch.FieldMap, Sitecore.ContentSearch"> | |
<fieldNames hint="raw:AddFieldByFieldName"> | |
<!-- Needed for updating documents in the index --> | |
<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> | |
<!-- Makes sure the language field is indexed using the correct analyzer --> | |
<field fieldName="_language" 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"/> | |
</myLanguageSearchConfiguration> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is a minimal custom Sitecore index configuration based on Mikkel Holck Madsen's Blog post: http://www.mikkelhm.dk/blog/defining-a-custom-index-in-sitecore-7-the-absolute-minimum
Only difference is the _language field which is used for querying documents in a specific language.