public class

IndexUtils

extends Object
java.lang.Object
   ↳ com.atlassian.jira.index.ha.IndexUtils

Class Overview

Helper methods to work with LuceneIndexes.

Summary

Nested Classes
enum IndexUtils.IndexPath Represents the paths in jira home where indexes are stored  
Public Constructors
IndexUtils(IssueIndexManager issueIndexManager, JiraHome jiraHome, LuceneDirectoryUtils luceneDirectoryUtils)
Public Methods
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
void clearIndex(String path)
This deletes all documents in all indexes (if they exist)
void copyIndexes(String sourcePath, String destinationPath)
Copies all indexes from a specified directory to another specified directory.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public IndexUtils (IssueIndexManager issueIndexManager, JiraHome jiraHome, LuceneDirectoryUtils luceneDirectoryUtils)

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