4

Is there some easy config patch or hack I could make which would disable all indexing activities? I want to do this for things like package installation and also deletion of large content branches which seem to take a very long time.

Ideally I'd like to be able to drop a single config file into the App_Config\Include folder and then remove it when I'm finished.

1 Answer 1

10

You could create a patch file that sets all the indexes strategies to manual, that would effectively disable any automated updates that might happen as a result of installing a package or other content updates.

Something like this should give you a start. NOTE: I have not tested the patches or patched all the required indexes, but this should give you a good starting point:

<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:set="http://www.sitecore.net/xmlconfig/set/" xmlns:role="http://www.sitecore.net/xmlconfig/role/"  xmlns:search="http://www.sitecore.net/xmlconfig/search/">
    <sitecore role:require="Standalone or ContentManagement" search:require="lucene">
      <contentSearch>
        <configuration type="Sitecore.ContentSearch.ContentSearchConfiguration, Sitecore.ContentSearch">
          <indexes hint="list:AddIndex">
          <index id="sitecore_core_index">
            <strategies hint="list:AddStrategy">
              <strategy set:ref="contentSearch/indexConfigurations/indexUpdateStrategies/manual" />
            </strategies>
          </index>
          <index id="sitecore_master_index">
            <strategies hint="list:AddStrategy">
              <strategy set:ref="contentSearch/indexConfigurations/indexUpdateStrategies/manual" />
            </strategies>
          </index>
          <index id="sitecore_web_index">
            <strategies hint="list:AddStrategy">
              <strategy set:ref="contentSearch/indexConfigurations/indexUpdateStrategies/manual" />
            </strategies>
          </index>
          <!-- Rinse and repeat for all indexes -->
          </indexes>
        </configuration>
      </contentSearch>
    </sitecore>
</configuration>

Here is a list of index ID's for Sitecore 9.0.1:

  • sitecore_core_index
  • sitecore_master_index
  • sitecore_web_index
  • sitecore_marketingdefinitions_master
  • sitecore_marketingdefinitions_web
  • sitecore_marketing_asset_index_master
  • sitecore_marketing_asset_index_web
  • sitecore_testing_index
  • sitecore_suggested_test_index
  • sitecore_fxm_master_index
  • sitecore_fxm_web_index

ref: Search Index Descriptions

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.