1

We have a custom Azure Index which we have enabled switch on rebuild for.

The works fine on the CM servers but. However on CD we get no data showing until we restart the Azure App Service for the CD.

I'm not sure what might be causing this but it seems like switch on rebuild is firing fine on the CM server and then it's deleting the old index. However on CD it is still looking at the old index as has not been told to look at the new index.

I have installed the patch from Sitecore for a known issue with this on 8.2. So this shouldn't be an issue anymore.

The config which is present on both CD and CM for our custom index includes the following. Should this be on both CD and CM or only on CM?:

...
<pipelines>
  <initialize>
    <processor type="Sitecore.ContentSearch.Azure.Events.RebuildEvents.SwitchOnRebuildEventHandler, Sitecore.ContentSearch.Azure" method="InitializeFromPipeline" />
  </initialize>
</pipelines>
<events>
  <event name="index:switchonrebuild">
    <handler type="Sitecore.ContentSearch.Azure.Events.RebuildEvents.SwitchOnRebuildEventHandler, Sitecore.ContentSearch.Azure" method="OnSwitchOnRebuildEvent" />
  </event>
  <event name="index:switchonrebuild:remote">
    <handler type="Sitecore.ContentSearch.Azure.Events.RebuildEvents.SwitchOnRebuildEventHandler, Sitecore.ContentSearch.Azure" method="OnSwitchOnRebuildEvent" />
  </event>
</events>

This is the config for the custom search index:

 <contentSearch>
  <configuration type="Sitecore.ContentSearch.ContentSearchConfiguration, Sitecore.ContentSearch">
    <indexes hint="list:AddIndex">
      <index id="my-custom-index" type="Sitecore.ContentSearch.Azure.CloudSearchProviderIndex, Sitecore.ContentSearch.Azure">
        <param desc="name">$(id)</param>
        <param desc="connectionStringName">cloud.search</param>
        <param desc="totalParallelServices">5</param>
        <!-- This initializes index property store. Id has to be set to the index id -->
        <param desc="propertyStore" ref="contentSearch/indexConfigurations/databasePropertyStore" param1="$(id)" />
        <configuration ref="contentSearch/indexConfigurations/customCloudIndexConfiguration" />
        <schemaBuilder ref="contentSearch/searchServiceSchemaBuilder" />
        <searchService type="Sitecore.ContentSearch.Azure.Http.CompositeSearchService, Sitecore.ContentSearch.Azure"/>
        <strategies hint="list:AddStrategy">
          <strategy ref="contentSearch/indexConfigurations/indexUpdateStrategies/manual" />
        </strategies>
        <locations hint="list:AddCrawler">
          <crawler type="MyCustom.ContentSearch.MySearchCrawler, MyCustom">
          </crawler>  
        </locations>
      </index>
    </indexes>
  </configuration>
</contentSearch>

using: Sitecore 8.2 u7

6
  • So it's just the custom index not working? Commented Nov 13, 2019 at 23:19
  • No the index works but when I update it (it has an manual update strategy where the data is uploaded from a CSV file) it doesn’t update correctly on cd servers, it only updates on cm servers. Commented Nov 13, 2019 at 23:20
  • Can you see the config getting updated as per sitecore.stackexchange.com/a/22781/1278 Commented Nov 14, 2019 at 0:52
  • I've just double checked this and I can see on update the active search index is changing from 'my-custom-index' to 'my-custom-index-891' when the data is uploaded and the index is rebuilt and then back to 'my-custom-index' again the next time the data is uploaded. So the catalog seems to be behaving as expected. Just that the CD servers are not picking up the new index name so is using the old one. Commented Nov 14, 2019 at 10:24
  • I think that you'll need to raise it with support. Only one month until 8.2 mainstream support ends 😉 Commented Nov 14, 2019 at 10:49

0

Your Answer

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

Browse other questions tagged or ask your own question.