1

To my knowledge, indexes get rebuilt automatically when a Content Author performs a Smart Publish and/or a Full Republish in Sitecore. That functionality does not seem to functioning as intended as we are having to manually perform a re-index, via the Indexing Manager, to see those items get added/modified/deleted in certain indexes.

My question is when specifically do the indexes get automatically rebuilt in Sitecore, and is there any setting in the .config's where this functionality can modified to NOT index automatically?

4

Sitecore can be configured to do rebuilds with very different strategies depending on the architecture and requirements (it can be after publish, or full republish, or even manual, i.e. only rebuilt when manually triggered). I recommend reading this article: https://doc.sitecore.net/sitecore_experience_platform/setting_up_and_maintaining/search_and_indexing/indexing/index_update_strategies

And then comparing that to your configuration to figure out which rebuilt strategy you're currently using for your indexes. I.e. if it is set to manual, then that would explain the behaviour you are currently seeing.

1
  • That article gave me a lot of what I needed. Very helpful. Apr 24 '18 at 19:08
2

When OnPublishEndAsynchronous strategy is set on any index if there is a large publish triggered it can cause a full rebuild of the indexes. As stated in the sitecore index stategies guide the strategy forces a full index rebuild when the number of entries in the history table exceeds the number defined in the Indexing.FullRebuildItemCountThreshold setting.

The value of the Indexing.FullRebuildItemCountThreshold setting has a default of 100000. In the config file Sitecore.ContentSearch.DefaultConfigurations.config you can look at how the strategy is defined:

          <onPublishEndAsyncSingleInstance type="Sitecore.ContentSearch.Maintenance.Strategies.OnPublishEndAsynchronousSingleInstanceStrategy, Sitecore.ContentSearch" singleInstance="true" role:require="Standalone or ContentManagement or ContentDelivery">
            <param desc="database">web</param>
            <!-- Whether or not a full index rebuild should be triggered when the number of items in the EventQueue exceeds the number specified 
               in ContentSearch.FullRebuildItemCountThreshold. -->
            <CheckForThreshold>true</CheckForThreshold>
          </onPublishEndAsyncSingleInstance>
1
  • 1
    Follow-up question regarding the history table: is this table automatically cleared in any way? Or is it really a cumulation of records? Meaning if you publish 10k items 10 times it will finally reach the threshold. And as a result, after the 10th time, the reindex will be performed.
    – Koen Heye
    Jul 13 at 12:29
1

Sitecore indexes are built by using following methods

  1. Publishing the content

  2. Navigate to control panel -> Indexing Manager -> clicking on rebuild search index button with the required indexes.

  3. Rebuild indexes by using Rebuild method of API
    Sitecore.ContentSearch.ContentSearchManager.GetIndex("sitecore_web_index")

You can check to see if following setting has been added and have some value, indexing will take place after provided amount of time. If it is set to zero, then it will disable the live indexing.

<setting name="Indexing.UpdateInterval">
     <patch:attribute name="value">00:00:00</patch:attribute>
 </setting>

Also, if you are wondering to disable indexing , you can disable indexing of items by using following sitecore API

  1. Sitecore.Configuration.Settings.Indexing.Enabled = false; (Sitecore 7 before versions)
  2. Sitecore.ContentSearch.Maintenance.IndexCustodian.PauseIndexing();(Sitecore 7 and after)
1
  • This is all helpful, but I am really looking for when Sitecore by default is set to automatically re-index. Is it only on Smart Publish / Full Republish and NOT for Incremental? Also, is it a certain type of Smart Publish with a minimum set of items that will instantiate a re-index? Looking for more specifics around these areas. Apr 24 '18 at 18:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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