Skip to main content
added 1 character in body
Source Link
 <?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>xxxDB<<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>
 <?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>xxxDB</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>
 <?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>
You’ve redacted your database names, which makes this difficult. It would be helpful to include whether your index is configured against master, web or another publishing target.
Source Link
$(id)$(id)truexxx.xxx.xxx.xxx, xxx.xxxxxxDB/sitecore/content/xxx/falsefalsexxx
 <?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>xxxDB</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>
$(id)$(id)truexxx.xxx.xxx.xxx, xxx.xxxxxxDB/sitecore/content/xxx/falsefalsexxx
 <?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>xxxDB</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>
Source Link

Sitecore 9.3 Solr Computed Field not updated

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.

$(id) $(id) true xxx.xxx.xxx.xxx, xxx.xxx xxxDB /sitecore/content/xxx/ false false xxx

any suggestion please. All your suggestions will be helpful to identify and solve the issue. Thanks!!!

Thanks, Prathik