Recently I did my first conversion from Lucene to SOLR. With Lucene being phased out in Sitecore 9 this will probably be more common. You can find a lot of different installation guides in installing SOLR, but there are a few things that tripped me up that I want to prevent others from having to deal with.
Avoid Pitfalls
- Make sure every Lucene config is disabled. Even the ones in the sub folders.
- Make sure all the SOLR configs are enabled even the ones in the sub folders.
- Make sure you don’t have any Cores with the same name inside the core.properties file. I had Sitecore_Master_Index in more than one file and all my Cores would disappear every time I restarted until I corrected the name.
Custom Indexes Differences
Some of this is obvious as you can replace Lucene with Solr, but some were not so obvious to me and I had to do some research and ask for help. I highlighted the less obvious ones.
From this:
<index
id=“acme_widgetgroups_index” type=“Sitecore.ContentSearch.LuceneProvider.LuceneIndex, Sitecore.ContentSearch.LuceneProvider“>
To this:
<index
id=“acme_widgetgroups_index” type=“Sitecore.ContentSearch.SolrProvider.SolrSearchIndex, Sitecore.ContentSearch.SolrProvider“>
From this:
<configuration
ref=“contentSearch/indexConfigurations/defaultLuceneIndexConfiguration“>
To this:
<configuration
ref=“contentSearch/indexConfigurations/defaultSolrIndexConfiguration“>
From this:
<fieldMap
type=“Sitecore.ContentSearch.FieldMap, Sitecore.ContentSearch“>
To this:
<fieldMap
ref=“contentSearch/indexConfigurations/defaultSolrIndexConfiguration/fieldMap“>
From this:
<field fieldName=“widgetfilters” storageType=“YES” indexType=“TOKENIZED” vectorType=“NO” boost=“1f” type=“System.String” settingType=“Sitecore.ContentSearch.LuceneProvider.LuceneSearchFieldConfiguration, Sitecore.ContentSearch.LuceneProvider“ />
To this:
<field fieldName=“widgetfilters” returnType=“string“ />
From this:
<documentOptions
type=“Sitecore.ContentSearch.LuceneProvider.LuceneDocumentBuilderOptions, Sitecore.ContentSearch.LuceneProvider“>
To this:
<documentOptions
type=“Sitecore.ContentSearch.SolrProvider.SolrDocumentBuilderOptions, Sitecore.ContentSearch.SolrProvider“>
I hope this helps you as you do your conversion. If you have any questions, feel free to ask.