The search and indexing configuration files
Version:
This topic describes the configuration files that are related to search and indexing. Sitecore ships with the following files:
The \App_Config\Sitecore\ContentSearch folder contains these files:
Sitecore.ContentSearch configuration file
Sitecore.ContentSearch configuration file
The Sitecore.ContentSearch.config file has the following elements that you can specify:
| Index element | Description |
|---|---|
<events> | Specifies event handlers for indexing:start, indexing:start:remote, indexing:end, and indexing:end:remote events. |
<hooks> | Runs necessary initialization processes, such as EventHub registration and warm-up queries for your index. You can extend this class or add additional hooks. |
<pipelines> | Specifies all pipeline processors related to search and indexing. |
<boostingManager> | Specifies the manager class controlling the search result boosting logic. |
<searchManager> | Specifies the search manager and provider classes. |
<scheduling> | Specifies the interval at which indexing occurs. |
<settings> | Specifies settings, such as parallel indexing, maximum search results, and date format. |
<commands> | Specifies handlers for indexing events. |
Default index configuration file
Default index configuration file
The default index configuration file has the following elements that you can specify:
- Index element: Description
AddExcludedField: Allows you to exclude fields from the index when the<indexAllFields>setting is set to true.<AddExcludedTemplate>: Allows you to exclude items that are based on specific templates from the index. Template inheritance is checked ifcheckTemplateInheritanceis enabled.<AddIncludedField>: Allows you to specify which fields to include in the index when the<indexAllFields>setting is set to false.<AddIncludedTemplate>: Allows you to only include items that are based on specific templates in the index. Template inheritance is checked ifcheckTemplateInheritanceis enabled. When you enable this setting, all the items that are based on other templates are excluded, thereby overriding theExcludeTemplateconfiguration.<AddFieldByFieldName>: Allows you to map a Sitecore field to an index and store it appropriately. Add a<field>schema here to enable multilanguage processing.<AddFieldByFieldTypeName>: Allows you to map a Sitecore field type to a type within the index. Add afieldTypeschema here so that the mappings work through the LINQ layer.<AddTypeMatch>: This field map allows you to take full control over how your data is stored in the index, in terms of both data type and format. It is a schema list that defines the data type a Sitecore item can be cast to and its formatting, for example:
<documentBuilderType>: The document builder class processes all the fields within Sitecore’s items and prepares data for storage within the index. You can override the document builder to modify how that data is prepared and apply any additional logic that might be required.<IndexFieldStorageValueFormatter>: A collection of all the possible converters for the platform. Converters allow converting a complex Sitecore object to an index, and vice-versa.<indexUpdateStrategies>: Specifies which update strategy to use.<fieldReaders>: Maps a field type by name to a strongly typed implementation of the field type. For example, html maps to an HTML field.<databasePropertyStore>: Specifies key values that can be used in a search.<configuration>: Settings for index configuration.<DefaultIndexConfiguration>: Settings used if no custom settings are available for an index.<IndexAllFields>: A Boolean flag that decides whether or not to index all fields. The default value istrue.When set totrue, use theexcludelist to remove fields from the index.When set tofalse, use theincludelist to add fields to the index.<fieldMap>: Enables you to map a Sitecore field name to the index and store it in an appropriate way, including original value storage, boost value, and data type.<virtualFieldProcessors>: Specifies custom query processing for a named field.<exclude>: Excludes items from the index based on template type.Excludes specific fields from the index, ifIndexAllFieldsis set totrue.<include>: Includes items from the index based on template type, ifIndexAllFieldsis set tofalse.<fields>: Enables you to format the way that field values are stored in the index, remove inbuilt Sitecore fields, and store computed fields.
If you have suggestions for improving this article, let us know!