While configuring cd instance on SOLR one has to remove index update strategies and set to manual from index definitions on cd server.
Can we do that using sitecore patching?
Sitecore Stack Exchange is a question and answer site for developers and end users of the Sitecore CMS and multichannel marketing software. It only takes a minute to sign up.
Sign up to join this communityWhile configuring cd instance on SOLR one has to remove index update strategies and set to manual from index definitions on cd server.
Can we do that using sitecore patching?
You can use <patch:delete />
to achieve this. It will look like:
<sitecore>
<contentSearch>
<configuration>
<indexes>
<index id="xxxxx">
<strategies hint="list:AddStrategy">
<patch:delete />
</strategies>
<strategies hint="list:AddStrategy">
<strategy ref="contentSearch/indexConfigurations/indexUpdateStrategies/manual" />
</strategies>
</index>
</indexes>
</configuration>
</contentSearch>
</sitecore>
<strategies hint="list:AddStrategy"> <patch:delete/> </strategies> <strategies hint="list:AddStrategy"> <strategy ref="contentSearch/indexConfigurations/indexUpdateStrategies/manual" /> </strategies>
/ can you add that to an answer please?
Jan 19, 2017 at 10:14
You can remove the original strategy and add strategy with same name just using ManualStrategy
type:
<?xml version="1.0" encoding="utf-8" ?>
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
<sitecore>
<contentSearch>
<indexConfigurations>
<indexUpdateStrategies>
<intervalAsyncMaster>
<patch:delete />
</intervalAsyncMaster>
<intervalAsyncMaster type="Sitecore.ContentSearch.Maintenance.Strategies.ManualStrategy, Sitecore.ContentSearch" />
</indexUpdateStrategies>
</indexConfigurations>
</contentSearch>
</sitecore>
</configuration>
You need to repeat that for all the strategies.
Thanks to that you don't worry how many indexes there are and if anyone else adds a new index later. They will use manual on CD servers always.