UseCharacterReplacements

IndexSettings.UseCharacterReplacements property

Gets or sets a value indicating whether to use character replacements or not. The default value is false.

public bool UseCharacterReplacements { get; set; }

Property Value

A value indicating whether to use character replacements or not.

Exceptions

exception condition
InvalidOperationException The value is changed while an index that uses these settings contains documents or is not in the Ready status.

Remarks

The replacements are applied to the words of a search as they are applied to the text of the documents: to the words of a query, of a phrase, of a wildcard pattern and of a date range, and to the words that the fuzzy search, the spelling corrector, the keyboard layout corrector, the synonyms, the homophones and the word forms give for them. The dictionaries get the words as they are, and the synonyms and the homophones of a word are found by its form after the replacements. A word whose form after the replacements is the form of a stop word after the replacements is a stop word of a search; the index keeps such a word of a document when the stop word has a replaced character, but the search does not find it. A regular expression of a query is matched with the terms of the index as they are, after the replacements. The words that a custom word splitter gives (see WordSplitter) get the replacements too.

The setting defines how the text of documents is divided into terms. Therefore, when an index uses these settings, the value can be changed only while the index contains no documents and its status is Ready.

The value is saved in the index when it is changed or, if that is not possible, before the next operation that changes the index.

A new index uses the settings object passed to its constructor until the index is disposed. If one settings object is used to create several indexes, each of them has to allow the change.

See Also