Performs indexing operation.
Adds files or folders by an absolute or relative path.
Documents from all subfolders will be indexed.
Namespace: GroupDocs.SearchAssembly: GroupDocs.Search (in GroupDocs.Search.dll) Version: 21.2
Syntaxpublic void Add(
string[] paths
)
Public Sub Add (
paths As String()
)
public:
void Add(
array<String^>^ paths
)
member Add :
paths : string[] -> unit
Parameters
- paths
- Type: SystemString
The paths to a files or folders to be indexed.
Examples
The example demonstrates how to add documents to an index.
string indexFolder = @"c:\MyIndex\";
string folderPath = @"c:\MyDocuments\";
string filePath = @"c:\Documents\MyFile.txt";
Index index = new Index(indexFolder);
string[] paths = new string[] { folderPath, filePath };
index.Add(paths);
See Also