1

Our application (Sitecore 9.0.2 SXA 1.8) is currently running on Azure PaaS with Azure Search as Search service

Recently we ran into this problem of master index exceeding 1000 field Limit

we understand that there are 2 options to solve this

  1. set IndexAllFields to false and include only relevant fields or templates to the index
  2. Add Unwanted fields to Sitecore.ContentSearch.Azure.Index.{Web/Master}.ExcludeFields.config

My question is what is ideal way to patch these changes and deploy them on Azure PaaS

should we copy all the contents of Sitecore.ContentSearch.Azure.DefaultIndexConfiguration.config and Sitecore.ContentSearch.Azure.Index.{Web/Master}.ExcludeFields.config and add it in our source control repository and deploy onto the PaaS environment

or

Is there a Way to patch only included fields/templates instead of replacing the entire file ?

1 Answer 1

3

Here is an example of how to patch in an exclude field by ID that I have taken from an SXA config.

<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="azure">
        <contentSearch>
            <indexConfigurations>
                <defaultCloudIndexConfiguration type="Sitecore.ContentSearch.Azure.CloudIndexConfiguration, Sitecore.ContentSearch.Azure">
                    <documentOptions type="Sitecore.ContentSearch.DocumentBuilderOptions, Sitecore.ContentSearch">
                        <exclude hint="list:AddExcludedField">
                            <LearnMoreTarget_A4270003 tag="{A4270003-480F-467A-BBEA-0D1B05B28656}">{A4270003-480F-467A-BBEA-0D1B05B28656}</LearnMoreTarget_A4270003>
                        </exclude>
                    </documentOptions>
                </defaultCloudIndexConfiguration>
            <indexConfigurations>
        </contentSearch>
    </sitecore>
</configuration>

The xml field needs to be unique hence the first 8 characters of the field ID are appended to the field name.

What to call this file and where to put it depends on your solution, but from this SXA example they patched it in as Foundation.Search.Azure.config. You can find more reading here about helix structure for configs.

1
  • I tried Setting <IndexAllFields> to false and added templates that i wanted to index in in <include hint="list:AddIncludedTemplate"> section , but i could see fields of those templates in sitecore_master_index , am i missing anything ? Apr 30, 2019 at 17:28

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.