Skip to main content

Exclude an item field from full-text search


Shows how you exclude content of item fields from being included in full text search.

By default, Sitecore aggregates content of all text fields in an item into a special index field. This happens during index update/rebuild operations, and it enables the full-text search feature. To use the full-text search feature, Sitecore queries the _content index field.

To exclude fields from full-text search:

  1. Open the App_Config\Sitecore\ContentSearch\Sitecore.ContentSearch.Solr.DefaultIndexConfiguration.config file, and navigate to the <exclude hint="list:AddExcludedFieldFromFullTextSearch"> node. This node contains a list of fields that are already excluded:

     <exclude hint="list:AddExcludedFieldFromFullTextSearch">
  2. Patch the configuration to add the fields you need by entering the ID of each field in the format shown above (for example <__LongDescription>{577F1689-7DE4-4AD2-A15F-7FDC1759285F}</__LongDescription>).

  3. Optionally, to exclude a field that contains sensitive data from all indexing, do the following:.

    • If the value of the indexAllFields setting is true, add the field to the lists in <exclude hint="list:AddExcludedField"> and <exclude hint="list:AddExcludedFieldFromFullTextSearch">.

    • If the value of the <indexAllFields setting is false, add the field to the list in <exclude hint="list:AddExcludedFieldFromFullTextSearch">.


      This is independent from the <exclude hint="list:AddExcludedField"> and <include hint="list:AddIncludedField"> settings. A Sitecore item field is only excluded from the _content Solr field if it is listed in the <exclude hint="list:AddExcludedFieldFromFullTextSearch"> list. Therefore, even if you only index whitelisted fields, you can still search for unindexed fields when you use full-text search.