Index Constructor (String, 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 otherwise.
Namespace: GroupDocs.SearchAssembly: GroupDocs.Search (in GroupDocs.Search.dll) Version: 21.8.1
Syntaxpublic Index(
string indexFolder,
bool overwriteIfExists
)
Public Sub New (
indexFolder As String,
overwriteIfExists As Boolean
)
public:
Index(
String^ indexFolder,
bool overwriteIfExists
)
new :
indexFolder : string *
overwriteIfExists : bool -> Index
Parameters
- indexFolder
- Type: SystemString
The index folder path. - overwriteIfExists
- Type: SystemBoolean
The flag of overwriting the index folder.
Examples
The example demonstrates how to create a new index in a folder that already contains another index.
string indexFolder = @"c:\MyIndex\";
Index index = new Index(indexFolder, true);
See Also