IndexUpdater

IndexUpdater class

Represents an index updater. This class performs reindexing documents in an index of an old version.

public class IndexUpdater

Constructors

Name Description
IndexUpdater() Initializes a new instance of the IndexUpdater class.

Methods

Name Description
CanUpdateVersion(string) Checks whether an index in the specified directory can be updated to the latest version.
IsLatestVersion(string) Checks whether the specified directory contains an index of the latest version.
UpdateVersion(string, string) Performs reindexing documents in an index of an old version. The updated index will be placed in the newIndexPath directory. The index in the indexPath directory will not be changed.

Remarks

Learn more

Examples

The example demonstrates a typical usage of the class.

string sourceIndexFolder = @"c:\MyOldIndex\";
string targetIndexFolder = @"c:\MyNewIndex\";

IndexUpdater updater = new IndexUpdater();

if (updater.CanUpdateVersion(sourceIndexFolder))
{
    VersionUpdateResult result = updater.UpdateVersion(sourceIndexFolder, targetIndexFolder);
}

See Also