I have a computed field which is not updated when Sitecore item getting into index (all other field values are indexed) but if I do manual rebuild for the index then my computed field value get updated properly. I tried diff index strategies but no luck. I am using Sitecore 9.3, below is my config.
<?xml version="1.0" encoding="utf-8" ?>
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:role="http://www.sitecore.net/xmlconfig/role/" xmlns:search="http://www.sitecore.net/xmlconfig/search/">
<sitecore search:require="solr">
<contentSearch>
<configuration type="Sitecore.ContentSearch.ContentSearchConfiguration, Sitecore.ContentSearch">
<indexes hint="list:AddIndex">
<index id="xyz" type="Sitecore.ContentSearch.SolrProvider.SolrSearchIndex, Sitecore.ContentSearch.SolrProvider">
<param desc="name">$(id)</param>
<param desc="core">$(id)</param>
<param desc="propertyStore" ref="contentSearch/indexConfigurations/databasePropertyStore" param1="$(id)" />
<configuration ref="contentSearch/indexConfigurations/defaultSolrIndexConfiguration">
<enableReadAccessIndexing>true</enableReadAccessIndexing>
<documentOptions ref="contentSearch/indexConfigurations/defaultSolrIndexConfiguration/documentOptions">
<include hint="list:AddIncludedTemplate">
<!-- template ids -->
</include>
<include hint="list:AddIncludedField">
<fieldId>
<!-- fields -->
</fieldId>
</include>
<field hint="raw:AddComputedIndexField">
<field fieldName="_myComputedField" returnType ="int">xxx.xxx.xxx.xxx, xxx.xxx</field>
</field>
</documentOptions>
</configuration>
<strategies hint="list:AddStrategy">
<strategy ref="contentSearch/indexConfigurations/indexUpdateStrategies/manual" />
<strategy ref="contentSearch/indexConfigurations/indexUpdateStrategies/syncItems" role:require="xyz and !Indexing" />
</strategies>
<locations hint="list:AddCrawler">
<crawler type="Sitecore.ContentSearch.SitecoreItemCrawler, Sitecore.ContentSearch">
<Database>NewsDB</Database>
<Root>/sitecore/content/xxx/</Root>
</crawler>
</locations>
<enableItemLanguageFallback>false</enableItemLanguageFallback>
<enableFieldLanguageFallback>false</enableFieldLanguageFallback>
</index>
</indexes>
</configuration>
<indexConfigurations>
<indexUpdateStrategies>
<syncItems type="Sitecore.ContentSearch.Maintenance.Strategies.SynchronousStrategy, Sitecore.ContentSearch">
<param desc="database">xxx</param>
</syncItems>
</indexUpdateStrategies>
</indexConfigurations>
</contentSearch>
</sitecore>
</configuration>
any suggestion please. All your suggestions will be helpful to identify and solve the issue. Thanks!!!
Thanks, Prathik
Sitecore.Context
values. Post the full code of your computed index field (with base class code if applicable).