1

We have this custom index that only contains pages for one section of the content tree. We want it setup so that publishing items under this path reindexes those items automatically. This seems like it should be default behavior but it is not working - we publish the items and no reindex happens. We can tell because old content is still shown on the site for these items, and the correct content is shown after rebuilding the entire custom index.

Our configuration is currently as follows:

<index id="bh_centers" type="Sitecore.ContentSearch.LuceneProvider.LuceneIndex, Sitecore.ContentSearch.LuceneProvider" patch:source="Sitecore.ContentSearch.Lucene.Index.Web.config">
<param desc="name">$(id)</param>
<param desc="folder">$(id)</param>
<!--
 This initializes index property store. Id has to be set to the index id 
-->
<param ref="contentSearch/indexConfigurations/databasePropertyStore" desc="propertyStore" param1="$(id)"/>
<configuration ref="contentSearch/indexConfigurations/defaultLuceneIndexConfiguration"/>
<strategies hint="list:AddStrategy">
<!--
 NOTE: order of these is controls the execution order 
-->
<strategy ref="contentSearch/indexConfigurations/indexUpdateStrategies/onPublishEndAsync"/>
</strategies>
<commitPolicyExecutor type="Sitecore.ContentSearch.CommitPolicyExecutor, Sitecore.ContentSearch">
<policies hint="list:AddCommitPolicy">
<policy type="Sitecore.ContentSearch.ModificationCountCommitPolicy, Sitecore.ContentSearch">
<Limit>300</Limit>
</policy>
</policies>
</commitPolicyExecutor>
<locations hint="list:AddCrawler">
<crawler type="Sitecore.ContentSearch.SitecoreItemCrawler, Sitecore.ContentSearch">
<Database>web</Database>
<Root>/sitecore/content/centers</Root>
</crawler>
</locations>
<enableItemLanguageFallback>false</enableItemLanguageFallback>
<enableFieldLanguageFallback>false</enableFieldLanguageFallback>
</index>

What configuration would be needed to make items get reindexed when they are published?

  • Is the issue only happening on this index or is it all indexes? It may be that the server event queue isn't picking up the publish:end:remote event. I'd check your sitecore config. And check your event queue and jobs are being processed. – Mark Gibbons Feb 13 at 0:14
  • Your configuration looks a lot like the OOTB sitecore_web_index except by one detail or two. Are you able to make the OOTB sitecore_web_index work properly or not even that? – Hugo Santos Feb 13 at 0:56
  • Is the issue that your cd server does not reindex or is this all on one server. – Chris Auer Feb 13 at 2:35
  • @MarkGibbons I don't know if it's happening for other indexes, and I'm not sure how to check - the custom index is the only one we are using the content search API in correlation with. My publish:end:remote event element has two handlers, HtmlCacheClearer and RenderingParametersCacheClearer. What specifically should I be looking for in sitecore.config? – Paul Feb 13 at 19:56
  • @HugoSantos Not sure if this is an issue with other indexes as well... see my above comment. – Paul Feb 13 at 19:57

Your Answer

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

Browse other questions tagged or ask your own question.