Update

Update()

Updates all indexes in the repository.

public void Update()

Examples

The example demonstrates how to update indexes in the repository.

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

repository.Update();

See Also


Update(UpdateOptions)

Updates all indexes in the repository.

public void Update(UpdateOptions options)
Parameter Type Description
options UpdateOptions The update options.

Examples

The example demonstrates how to update indexes in the repository.

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