Skip to main content

The search and indexing configuration files

Abstract

Describes the configuration files that are related to search and indexing.

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:

contentsearch_configuration_files.png

The \App_Config\Include\Examples folder contains these files:

contentsearch_example_configuration_files.png

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 warmup 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.

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 if checkTemplateInheritance is 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 if checkTemplateInheritance is enabled. When you enable this setting, all the items that are based on other templates are excluded, thereby overriding the ExcludeTemplate configuration.

<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 a fieldType schema 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:

<typeMatches hint="raw:AddTypeMatch">
     <typeMatch typeName="guid"  type="System.Guid" fieldNameFormat="{0}_s" />
     <typeMatch typeName="string"  type="System.String" fieldNameFormat="{0}_ls" />
</typeMatches>

<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 is true.

When set to true, use the exclude list to remove fields from the index.

When set to false, use the include list 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, if IndexAllFields is set to true.

<include>

Includes items from the index based on template type, if IndexAllFields is set to false.

<fields>

Enables you to format the way that field values are stored in the index, remove inbuilt Sitecore fields, and store computed fields.