Index Constructor (String, IndexSettings, Boolean)
Initializes a new instance of the Index class. Loads an existing index from disk if overwriteIfExists is false; creates a new index on disk with particular index settings otherwise.

Namespace: GroupDocs.Search
Assembly: GroupDocs.Search (in GroupDocs.Search.dll) Version: 20.6
Syntax
public Index(
	string indexFolder,
	IndexSettings settings,
	bool overwriteIfExists
)

Parameters

indexFolder
Type: SystemString
The index folder path.
settings
Type: GroupDocs.SearchIndexSettings
The index settings object.
overwriteIfExists
Type: SystemBoolean
The flag of overwriting the index folder.
Examples
The example demonstrates how to create an index on a disk with particular index settings.
C#
string indexFolder = @"c:\MyIndex\";
IndexSettings settings = new IndexSettings();
settings.IndexType = IndexType.CompactIndex;
Index index = new Index(indexFolder, settings, true);
See Also