com.atlassian.jira.issue.index
Interface IssueIndexManager

All Known Implementing Classes:
DefaultIndexManager

public interface IssueIndexManager

Manages Lucene search indexes.


Method Summary
 long activate(String indexPath, com.atlassian.johnson.event.Event appEvent)
          Activates search indexes.
 void deactivate()
          Deactivates indexing (as happens from the admin page) and removes index directories.
 void deactivate(String filePath)
          Deactivate a specific search index and remove its directory.
 void deIndex(org.ofbiz.core.entity.GenericValue issue)
          Remove an issue from the search index.
 Collection getAllIndexPaths()
          Returns a Collection of Strings, each respesenting a path to the issue index directory, comment index directory and all existing plugin index directories.
 org.apache.lucene.store.Directory getCommentDirectory()
          Get the 'comments' index subtree's directory.
 String getCommentPath()
          Get path to the 'comments' index subtree.
 Collection getExistingPluginsPaths()
          Returns a collection of Strings, each one representing the absolute path to the actual existing directory where a plugin keeps its indexes.
 org.apache.lucene.store.Directory getIssueDirectory()
          Get the 'issues' index subtree's directory.
 String getIssuePath()
          Get path to the 'issues' index subtree.
 String getPluginsRootPath()
          Get the root path of the index directory for plugins.
 boolean isBusy()
          If any indexing operations are taking place.
 void reIndex(org.ofbiz.core.entity.GenericValue issue)
          Reindex an issue (eg.
 void reIndex(Issue issue)
          Reindex an issue (eg.
 long reIndexAll()
          Reindex all issues.
 long reIndexAll(com.atlassian.johnson.event.Event event)
          Reindex all issues.
 long reIndexIssueObjects(Collection issueObjects)
          Reindex a set of issues.
 long reIndexIssues(Collection issues)
          Reindex a set of issues (GenericValues).
 

Method Detail

reIndexAll

public long reIndexAll()
                throws IndexException
Reindex all issues.

Returns:
Reindex time in ms.
Throws:
IndexException

reIndexAll

public long reIndexAll(com.atlassian.johnson.event.Event event)
                throws IndexException
Reindex all issues.

Parameters:
event - Reindex Event that the caller has set (see source in IndexAdminImpl.doActivate()).
Returns:
Reindex time in ms.
Throws:
IndexException

reIndex

public void reIndex(org.ofbiz.core.entity.GenericValue issue)
             throws IndexException
Reindex an issue (eg. after field updates).

Throws:
IndexException

reIndex

public void reIndex(Issue issue)
             throws IndexException
Reindex an issue (eg. after field updates).

Throws:
IndexException

deIndex

public void deIndex(org.ofbiz.core.entity.GenericValue issue)
             throws IndexException
Remove an issue from the search index.

Throws:
IndexException

reIndexIssues

public long reIndexIssues(Collection issues)
                   throws IndexException
Reindex a set of issues (GenericValues). Use reIndexIssueObjects(Collection) instead when possible.

Parameters:
issues - The Issue GenericValues to reindex.
Returns:
Reindex time in ms.
Throws:
IndexException

reIndexIssueObjects

public long reIndexIssueObjects(Collection issueObjects)
                         throws IndexException
Reindex a set of issues.

Parameters:
issueObjects - Set of Issues to reindex.
Returns:
Reindex time in ms.
Throws:
IndexException

getIssuePath

public String getIssuePath()
Get path to the 'issues' index subtree.


getIssueDirectory

public org.apache.lucene.store.Directory getIssueDirectory()
Get the 'issues' index subtree's directory.


getCommentPath

public String getCommentPath()
Get path to the 'comments' index subtree.


getCommentDirectory

public org.apache.lucene.store.Directory getCommentDirectory()
Get the 'comments' index subtree's directory.


getPluginsRootPath

public String getPluginsRootPath()
Get the root path of the index directory for plugins. Any plugin that keeps indexes should create its own sub-directory under this path and create its indexes in its own sub-directory


getExistingPluginsPaths

public Collection getExistingPluginsPaths()
Returns a collection of Strings, each one representing the absolute path to the actual existing directory where a plugin keeps its indexes. Each directory in the collection should be a sub-directory under the plugin's index root path. See getPluginsRootPath().

If a plugin index root path does not exist, or is empty (no sub-directopries exist) then an empty collection will be returned.


getAllIndexPaths

public Collection getAllIndexPaths()
Returns a Collection of Strings, each respesenting a path to the issue index directory, comment index directory and all existing plugin index directories.


isBusy

public boolean isBusy()
If any indexing operations are taking place.


deactivate

public void deactivate()
                throws Exception
Deactivates indexing (as happens from the admin page) and removes index directories.

Throws:
Exception

activate

public long activate(String indexPath,
                     com.atlassian.johnson.event.Event appEvent)
              throws Exception
Activates search indexes.

Parameters:
indexPath - Root path to the search index.
appEvent - Optional reindex Event that the caller has set (see source in IndexAdminImpl.doActivate()) or null.
Returns:
Reindex time in ms
Throws:
Exception

deactivate

public void deactivate(String filePath)
                throws Exception
Deactivate a specific search index and remove its directory.

Throws:
Exception


Copyright © 2002-2006 Atlassian. All Rights Reserved.