Index Constructor (String, IndexSettings) |
Initializes a new instance of the
Index class.
Creates a new index with particular settings or opens an existing index on disk.
Namespace: GroupDocs.SearchAssembly: GroupDocs.Search (in GroupDocs.Search.dll) Version: 21.2
Syntaxpublic Index(
string indexFolder,
IndexSettings settings
)
Public Sub New (
indexFolder As String,
settings As IndexSettings
)
public:
Index(
String^ indexFolder,
IndexSettings^ settings
)
new :
indexFolder : string *
settings : IndexSettings -> Index
Parameters
- indexFolder
- Type: SystemString
The index folder path. - settings
- Type: GroupDocs.SearchIndexSettings
The index settings object.
Examples
The example demonstrates how to create an index on a disk with particular index settings.
string indexFolder = @"c:\MyIndex\";
IndexSettings settings = new IndexSettings();
settings.IndexType = IndexType.CompactIndex;
Index index = new Index(indexFolder, settings);
See Also