Upgrading Sitecore Content Search 7.2 to 7.5
Wed 15 June, 2016 / By Jon D Jones
When you upgrade a website from Sitecore 7.2 to version 7.5, there are several configuration tweaks you need to implement before your search will work. In today's tutorial, I'm going to cover some of the common pitfalls I've encountered during the upgrade process.
After Upgrading To 7.5 My Site Doesn't Load
After running my initial upgrade to 7.5, when I tried to access the Sitecore backend, the Site threw an exception.
After copying a copy of 'Sitecore.ContentSearch.config' from a clean 7.5 install into my upgraded webroots, 'App_Config' -> 'Include' folder the exception disappeared and the content editor loaded.
The first thing I wanted to do was re-index my search indexes due to an issue on the homepage. I went to the Sitecore Desktop and attempted to open the Indexing Manager ('Start' -> 'Control Panel' -> 'Index' -> 'Indexing Manager'). The Indexing manager wouldn't load and instead threw an excecption:
'Could not find the computed index field type: Sitecore.ContentSearch.ComputedFields.Culture,Sitecore.ContentSearch'
This issue is down to more old and obsolete config files in my 'Include' folder. In this instance, no-one had done any custom modifications to any of these files, so I could simply override them with copies from a fresh 7.5 install. For reference, you can get the files here Sitecore.ContentSearch.75.ConfigFiles
This fixed my first issue, but, when I tried to open the 'Indexing Manager' again. I encountered this issue.
'Could not find configuration node: contentSearch/databasePropertyStore'
In case you get a similar Sitecore error, it's basically complaining because it can't find a config value. The 'databasePropertyStore' refers to a node that should exist in one of the search configs.
If we look at Sitecore upgrade configuration notes, here
and search for 'databasePropertyStore' we can see that it's been moved from 'App_Config\Include\Sitecore.ContentSearch.Lucene.DefaultIndexConfiguration.config'
If we read the installation notes it says that for each index definition config file, we need to do a find and replace on the ref attribute of the node from “contentSearch/databasePropertyStore” to “contentSearch/indexConfigurations/databasePropertyStore”.
As I'd used clean config versions for Sitecore.ContentSearch.Lucene.Index.Core.config, Sitecore.ContentSearch.Lucene.Index.Master.config and Sitecore.ContentSearch.Lucene.Index.Web.config, I knew these files should be correct. After a lot of searching, I managed to find three custom Lucene indexes for the site I was working on in question, tucked away in an obscure folder within the 'Include' folder.
When I changed the databasePropertyStore reference to, contentSearch/indexConfigurations/databasePropertyStore, I was one step closer, but trying to load the indexing manager now resulted in this error:
Could not find configuration node: contentSearch/indexUpdateStrategies/intervalAsyncCore
Reading the Sitecore upgrade notes:
'For each index definition, update the ref attribute value of the node in the element in the following way: paths like this “contentSearch/XXX” need to be update to the paths like this “contentSearch/indexConfigurations/XXX”'
I went back into my custom index config files and updated all the reference in strategies section, from :
<strategy ref="contentSearch/indexUpdateStrategies/rebuildAfterFullPublish" />
<strategy ref="contentSearch/indexUpdateStrategies/onPublishEndAsync" />
<strategy ref="contentSearch/indexUpdateStrategies/remoteRebuild" />
<strategy ref="contentSearch/indexConfigurations/indexUpdateStrategies/rebuildAfterFullPublish" />
<strategy ref="contentSearch/indexConfigurations/indexUpdateStrategies/onPublishEndAsync" />
<strategy ref="contentSearch/indexConfigurations/indexUpdateStrategies/remoteRebuild" />
After this change, jackpot my indexing manager worked and I was able to re-index my site.
In today's post,
we've managed to get a newly upgraded Sitecore search to update. If you're reading this and you are stuck, my first advice would be to always read the Sitecore upgrade instructions. Whenever I've done Sitecore upgrades, I always find 'Beyond Compare' a life saver. Without being able to see the difference between folder structures, it's impossible to know what config changes have been copied by an upgrade, and what config files you need to update manually yourself.