Method CleanupOldIndexFiles
CleanupOldIndexFiles(Directory, String)
Cleans up the index directory from old index files. This method uses the
last commit found by GetLastCommit(Directory). If it matches the
expected segmentsFile
, then all files not referenced by this commit point
are deleted.
Declaration
public static void CleanupOldIndexFiles(Directory directory, string segmentsFile)
Parameters
Type | Name | Description |
---|---|---|
Directory | directory | |
System.String | segmentsFile |
Remarks
NOTE: This method does a best effort attempt to clean the index directory. It suppresses any exceptions that occur, as this can be retried the next time.