Class Overview
Helper methods to work with LuceneIndexes.
Summary
Nested Classes |
enum |
IndexUtils.IndexPath |
Represents the paths in jira home where indexes are stored
|
[Expand]
Inherited Methods |
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
final
void
|
wait()
|
|
Fields
public
static
final
PatternFilenameFilter
INDEX_SNAPSHOT_FILTER
Public Constructors
Public Methods
public
Map<IndexUtils.IndexPath, IndexUtils.IndexPathMapping>
buildIndexPathMappings
(String sourcePath, String destinationPath)
Builds a mapping from the source index filepath to the destination filepath - keyed by the type of index
Parameters
sourcePath
| the root of the source index |
destinationPath
| the root of the destination index |
public
void
clearIndex
(String path)
This deletes all documents in all indexes (if they exist)
Parameters
path
| the root of the index to clear
|
public
void
copyIndexes
(String sourcePath, String destinationPath)
Copies all indexes from a specified directory to another specified directory. Any indexes on the destination directory will
be deleted.
Parameters
sourcePath
| source of index files |
destinationPath
| destination of index files
|
public
String
takeIndexSnapshot
(String sourcePath, String destinationPath, String snapshotId, int maxSnapshots, IndexSnapshotContribution contribution)
Parameters
sourcePath
| the root of the source index directory |
destinationPath
| the destination directory |
snapshotId
| an ID for the snapshot |
maxSnapshots
| maximum number of snapshots to keep in the destination directory |
contribution
| an additional contribution to include in the snapshot |
Protected Methods
protected
int
deleteOldSnapshots
(File directory, int numToKeep)