com.atlassian.jira.issue.index
Interface IssueIndexManager

All Superinterfaces:
IndexLifecycleManager, Shutdown, Sized
All Known Implementing Classes:
BulkOnlyIndexManager, DefaultIndexManager

public interface IssueIndexManager
extends IndexLifecycleManager

Manages Lucene search indexes.


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.atlassian.jira.util.index.IndexLifecycleManager
IndexLifecycleManager.Composite
 
Method Summary
 void deIndex(org.ofbiz.core.entity.GenericValue issue)
          Remove an issue from the search index.
 org.apache.lucene.search.IndexSearcher getCommentSearcher()
          Get an IndexSearcher that can be used to search the comment index.
 java.util.Collection<java.lang.String> 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.search.IndexSearcher getIssueSearcher()
          Get an IndexSearcher that can be used to search the issue index.
 java.lang.String getPluginsRootPath()
          Get the root path of the index directory for plugins.
 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 reIndexIssueObjects(java.util.Collection<? extends Issue> issueObjects)
          Reindex a set of issues.
 long reIndexIssues(java.util.Collection<org.ofbiz.core.entity.GenericValue> issues)
          Reindex a set of issues (GenericValues).
 long reIndexIssues(IssuesIterable issuesIterable, Context context)
          Reindex a list of issues, passing an optional event that will be set progress
 
Methods inherited from interface com.atlassian.jira.util.index.IndexLifecycleManager
activate, deactivate, getAllIndexPaths, isIndexingEnabled, optimize, reIndexAll, shutdown, size
 
Methods inherited from interface com.atlassian.jira.util.collect.Sized
isEmpty
 

Method Detail

reIndexAll

long reIndexAll()
                throws IndexException
Reindex all issues.

Returns:
Reindex time in ms.
Throws:
IndexException

reIndex

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

Throws:
IndexException

reIndexIssues

long reIndexIssues(IssuesIterable issuesIterable,
                   Context context)
                   throws IndexException
Reindex a list of issues, passing an optional event that will be set progress

Parameters:
issuesIterable - IssuesIterable
context - used to report progress back to the user or to the logs. Must not be null.
Returns:
Reindex time in ms.
Throws:
IndexException

reIndex

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

Throws:
IndexException

deIndex

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

Throws:
IndexException

reIndexIssues

long reIndexIssues(java.util.Collection<org.ofbiz.core.entity.GenericValue> 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

long reIndexIssueObjects(java.util.Collection<? extends Issue> issueObjects)
                         throws IndexException
Reindex a set of issues.

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

getPluginsRootPath

java.lang.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

java.util.Collection<java.lang.String> 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.


getIssueSearcher

org.apache.lucene.search.IndexSearcher getIssueSearcher()
Get an IndexSearcher that can be used to search the issue index.

Note: This is an unmanaged IndexSearcher. You MUST call IndexSearcher.close() when you are done with it. Alternatively you should really call SearchProviderFactory#getSearcher(String)) passing in SearchProviderFactory.ISSUE_INDEX as it is a managed searcher and all the closing semantics are handled for you.


getCommentSearcher

org.apache.lucene.search.IndexSearcher getCommentSearcher()
Get an IndexSearcher that can be used to search the comment index.

Note: This is an unmanaged IndexSearcher. You MUST call IndexSearcher.close() when you are done with it. Alternatively you should really call SearchProviderFactory#getSearcher(String)) passing in SearchProviderFactory.COMMENT_INDEX as it is a managed searcher and all the closing semantics are handled for you.



Copyright © 2002-2010 Atlassian. All Rights Reserved.