IndexAdd Method (String)
Performs indexing operation. Adds a file or folder by an absolute or relative path. Documents from all subfolders will be indexed.

Namespace: GroupDocs.Search
Assembly: GroupDocs.Search (in GroupDocs.Search.dll) Version: 20.1
Syntax
public void Add(
	string path
)

Parameters

path
Type: SystemString
The path to a file or folder to be indexed.
Examples
The example demonstrates how to add documents to an index.
C#
string indexFolder = @"c:\MyIndex\";
string folderPath = @"c:\MyDocuments\";
string filePath = @"c:\Documents\MyFile.txt";

Index index = new Index(indexFolder); // Creating index in the specified folder
index.Add(folderPath); // Indexing documents in the specified folder
index.Add(filePath); // Indexing the specified document
See Also