6

The Sitecore docs list the available index update strategies, but there is no mention of what happens if no strategies are configured. For example, would the index on the CD server for the following configuration ever be updated?

<index id="schoolsite" type="Sitecore.Search.Index, Sitecore.Kernel">
    <param desc="name">$(id)</param>
    <param desc="folder">schoolsite</param>
    <Analyzer ref="search/analyzer" />
    <locations hint="list:AddCrawler">
        <web type="Sitecore.Search.Crawlers.DatabaseCrawler,Sitecore.Kernel">
            <Database>web</Database>
            <Root>/sitecore/content/schoolsite/Units</Root>
            <include hint="list:IncludeTemplate">
            <unit>{E711EF29-1031-461D-B7F0-18524F255EC4}</unit>
            <pdf>{2136F1FC-D871-43B8-85B1-2698DEF505E5}</pdf>
            <video>{D9B5C725-51E4-4A0F-A709-3D7514BE6BB1}</video>
            <infographic>{7902B359-EF49-4BE1-9121-8E70596282BC}</infographic>
            </include>
            <Boost>2.0</Boost>
        </web>
    </locations>
</index>
9

It's my understanding that if no strategies are defined, than you would be unable to rebuild the index unless you do it directly on that server via code.

Specifying a strategy calls the AddStrategy method on the index:

<strategies hint="list:AddStrategy">
  <!-- NOTE: order of these is controls the execution order -->
    <strategy ref="contentSearch/indexConfigurations/indexUpdateStrategies/onPublishEndAsync" />
</strategies>

For Lucene indexes, this leads to this strategy being added to a private List<IIndexUpdateStrategy> field. If none are specified, this remains empty.

This field is just used to instantiate the strategies, which in turn are responsible for setting up the hooks, etc. they require for that index. There is no public Strategies property on the Index, so in turn there is no way for other parts of Sitecore to determine if an index has no strategies and behave differently if so.

  • I am not fully sure, but as I recall it, if you are missing some of the vital indexing strategies (or have none), other parts of Sitecore will seize to work. I remember a colleague of mine having issues when specific indexing strategies were disabled. – Søren Engel Oct 6 '16 at 17:52
6

I believe that if you use the rebuild index on the developer ribbon/bar in the content editor on the content management server it should raise an event on the CD servers to rebuild the index.

enter image description here

  • 1
    This relies on the indexes subscribing to the RemoteRebuild indexing strategy. – Kasaku Oct 4 '16 at 11:39

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.