Add
Add(string)
Performs indexing operation. Adds a file or folder by an absolute or relative path. Documents from all subfolders will be indexed.
public void Add(string path)
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.
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
- class Index
- namespace GroupDocs.Search
- assembly GroupDocs.Search
Add(string, IndexingOptions)
Performs indexing operation. Adds a file or folder by an absolute or relative path. Documents from all subfolders will be indexed.
public void Add(string path, IndexingOptions options)
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.
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
IndexingOptions options = new IndexingOptions();
options.Threads = 2; // Setting the number of indexing threads
index.Add(folderPath, options); // Indexing documents in the specified folder
index.Add(filePath, options); // Indexing the specified document
See Also
- class IndexingOptions
- class Index
- namespace GroupDocs.Search
- assembly GroupDocs.Search
Add(string[])
Performs indexing operation. Adds files or folders by an absolute or relative path. Documents from all subfolders will be indexed.
public void Add(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.
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
string[] paths = new string[] { folderPath, filePath };
index.Add(paths); // Indexing documents at the specified paths
See Also
- class Index
- namespace GroupDocs.Search
- assembly GroupDocs.Search
Add(string[], IndexingOptions)
Performs indexing operation. Adds files or folders by an absolute or relative path. Documents from all subfolders will be indexed.
public void Add(string[] paths, IndexingOptions options)
Parameter | Type | Description |
---|---|---|
paths | String[] | The paths to a files or folders to be indexed. |
options | IndexingOptions | The indexing options. |
Examples
The example demonstrates how to add documents to an index with particular indexing options.
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
IndexingOptions options = new IndexingOptions();
options.Threads = 2; // Setting the number of indexing threads
string[] paths = new string[] { folderPath, filePath };
index.Add(paths, options); // Indexing documents at the specified paths
See Also
- class IndexingOptions
- class Index
- namespace GroupDocs.Search
- assembly GroupDocs.Search
Add(Document[], IndexingOptions)
Performs indexing operation. Adds documents from file system, stream or structure.
public void Add(Document[] documents, IndexingOptions options)
Parameter | Type | Description |
---|---|---|
documents | Document[] | The documents from file system, stream or structure. |
options | IndexingOptions | The indexing options. |
See Also
- class Document
- class IndexingOptions
- class Index
- namespace GroupDocs.Search
- assembly GroupDocs.Search
Add(ExtractedData[], IndexingOptions)
Performs indexing operation. Adds the extracted data to the index.
public void Add(ExtractedData[] data, IndexingOptions options)
Parameter | Type | Description |
---|---|---|
data | ExtractedData[] | The extracted data. |
options | IndexingOptions | The indexing options. |
See Also
- class ExtractedData
- class IndexingOptions
- class Index
- namespace GroupDocs.Search
- assembly GroupDocs.Search