IndexRepositoryUpdate Method (UpdateOptions)
Updates all indexes in the repository.

Namespace: GroupDocs.Search
Assembly: GroupDocs.Search (in GroupDocs.Search.dll) Version: 20.8
Syntax
public void Update(
	UpdateOptions options
)

Parameters

options
Type: GroupDocs.Search.OptionsUpdateOptions
The update options.
Examples
The example demonstrates how to update indexes in the repository.
C#
string indexFolder = @"c:\MyIndex\";
string documentsFolder = @"c:\MyDocuments\";

IndexRepository repository = new IndexRepository();

Index index = repository.Create(indexFolder); // Creating index
index.Add(documentsFolder); // Indexing documents

// Delete documents from the documents folder or modify them or add new documents to the folder

UpdateOptions options = new UpdateOptions();
options.Threads = 2; // Setting the number of indexing threads
repository.Update(options);
See Also