Performs indexing operation. Adds a file or folder by an absolute or relative path. Documents from all subfolders will be indexed.
publicvoidAdd(stringpath)
Parameter
Type
Description
path
String
The path to a file or folder to be indexed.
Examples
The example demonstrates how to add documents to an index.
stringindexFolder=@"c:\MyIndex\";stringfolderPath=@"c:\MyDocuments\";stringfilePath=@"c:\Documents\MyFile.txt";Indexindex=newIndex(indexFolder);// Creating index in the specified folderindex.Add(folderPath);// Indexing documents in the specified folderindex.Add(filePath);// Indexing the specified document
Performs indexing operation. Adds a file or folder by an absolute or relative path. Documents from all subfolders will be indexed.
publicvoidAdd(stringpath,IndexingOptionsoptions)
Parameter
Type
Description
path
String
The path to a file or folder to be indexed.
options
IndexingOptions
The indexing options.
Examples
The example demonstrates how to add documents to an index with particular indexing options.
stringindexFolder=@"c:\MyIndex\";stringfolderPath=@"c:\MyDocuments\";stringfilePath=@"c:\Documents\MyFile.txt";Indexindex=newIndex(indexFolder);// Creating index in the specified folderIndexingOptionsoptions=newIndexingOptions();options.Threads=2;// Setting the number of indexing threadsindex.Add(folderPath,options);// Indexing documents in the specified folderindex.Add(filePath,options);// Indexing the specified document
Performs indexing operation. Adds files or folders by an absolute or relative path. Documents from all subfolders will be indexed.
publicvoidAdd(string[]paths)
Parameter
Type
Description
paths
String[]
The paths to a files or folders to be indexed.
Examples
The example demonstrates how to add documents to an index.
stringindexFolder=@"c:\MyIndex\";stringfolderPath=@"c:\MyDocuments\";stringfilePath=@"c:\Documents\MyFile.txt";Indexindex=newIndex(indexFolder);// Creating index in the specified folderstring[]paths=newstring[]{folderPath,filePath};index.Add(paths);// Indexing documents at the specified paths
The example demonstrates how to add documents to an index with particular indexing options.
stringindexFolder=@"c:\MyIndex\";stringfolderPath=@"c:\MyDocuments\";stringfilePath=@"c:\Documents\MyFile.txt";Indexindex=newIndex(indexFolder);// Creating index in the specified folderIndexingOptionsoptions=newIndexingOptions();options.Threads=2;// Setting the number of indexing threadsstring[]paths=newstring[]{folderPath,filePath};index.Add(paths,options);// Indexing documents at the specified paths