IndexSettings

IndexSettings class

Represents the index settings that allow to customize the indexing operations.

public class IndexSettings

Constructors

Name Description
IndexSettings() Initializes a new instance of the IndexSettings class.

Properties

Name Description
CustomExtractors { get; } Gets the custom extractor collection.
DocumentFilter { get; set; } Gets or sets a document filter. The DocumentFilter works on the inclusion logic. Use the DocumentFilter class for creation of a document filter instances. The default value is null, which means that all added documents are indexed.
IndexType { get; set; } Gets or sets the index type. The default value is NormalIndex.
InMemoryIndex { get; } Gets a value indicating whether the index is stored in memory or on disk.
Logger { get; set; } Gets or sets a logger that is used for logging events and errors in the index. Note that the logger is not saved and must be created and assigned each time the index is created or loaded.
MaxIndexingReportCount { get; set; } Gets or sets the maximum number of indexing reports. The default value is 5.
MaxSearchReportCount { get; set; } Gets or sets the maximum number of search reports. The default value is 10.
SearchThreads { get; set; } Gets or sets the number of threads used for the search. The default value is Default, which means that the search will be performed using the number of threads equal to the number of processor cores.
TextStorageSettings { get; set; } Gets or sets the text storage settings. The default value is null, which means that document texts are not stored.
UseCharacterReplacements { get; set; } Gets or sets a value indicating whether to use character replacements or not. The default value is false.
UseStopWords { get; set; } Gets or sets a value indicating whether to use stop words or not. The default value is true.

Remarks

Learn more

Examples

The example demonstrates a typical usage of the class.

string indexFolder = @"c:\MyIndex\";
IndexSettings settings = new IndexSettings();
settings.IndexType = IndexType.CompactIndex; // Setting the index type

Index index = new Index(indexFolder, settings); // Creating an index

See Also