|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.jira.issue.index.DefaultIndexManager
public class DefaultIndexManager
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.atlassian.jira.util.index.IndexLifecycleManager |
|---|
IndexLifecycleManager.Composite |
| Field Summary | |
|---|---|
static org.apache.lucene.analysis.Analyzer |
ANALYZER_FOR_INDEXING
|
static org.apache.lucene.analysis.Analyzer |
ANALYZER_FOR_SEARCHING
|
static String |
COMMENTS_SUBDIR
|
static String |
ISSUES_SUBDIR
|
static String |
PLUGINS_SUBDIR
|
| Constructor Summary | |
|---|---|
DefaultIndexManager(IndexingConfiguration indexProperties,
IssueIndexer issueIndexer,
IndexPathManager indexPath,
ReindexMessageManager reindexMessageManager)
|
|
DefaultIndexManager(IndexPathManager indexPath)
|
|
| Method Summary | |
|---|---|
long |
activate(Context context)
Activates search indexes. |
void |
deactivate()
De-activates indexing (as happens from the admin page) and removes index directories. |
void |
deIndex(org.ofbiz.core.entity.GenericValue entity)
Remove an issue from the search index. |
static void |
flushThreadLocalSearchers()
|
Collection<String> |
getAllIndexPaths()
|
org.apache.lucene.search.IndexSearcher |
getCommentSearcher()
Get an IndexSearcher that can be used to search the comment index. |
List<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. |
String |
getPluginsRootPath()
Get the root path of the index directory for plugins. |
boolean |
isEmpty()
|
boolean |
isIndexingEnabled()
|
long |
optimize()
Optimize the underlying indexes. |
void |
reIndex(org.ofbiz.core.entity.GenericValue issueGV)
Reindex an issue (eg. |
void |
reIndex(Issue issue)
Reindex an issue (eg. |
long |
reIndexAll()
Reindex all issues. |
long |
reIndexAll(Context context)
Reindex everything. |
long |
reIndexIssueObjects(Collection<? extends Issue> issueObjects)
Reindex a set of issues. |
long |
reIndexIssues(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 |
void |
shutdown()
Shuts down the indexing manager and closes its resources (if any). |
int |
size()
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final org.apache.lucene.analysis.Analyzer ANALYZER_FOR_SEARCHING
public static final org.apache.lucene.analysis.Analyzer ANALYZER_FOR_INDEXING
public static final String COMMENTS_SUBDIR
public static final String ISSUES_SUBDIR
public static final String PLUGINS_SUBDIR
| Constructor Detail |
|---|
public DefaultIndexManager(IndexPathManager indexPath)
public DefaultIndexManager(IndexingConfiguration indexProperties,
IssueIndexer issueIndexer,
IndexPathManager indexPath,
ReindexMessageManager reindexMessageManager)
| Method Detail |
|---|
public void deactivate()
IndexLifecycleManager
deactivate in interface IndexLifecycleManagerpublic long activate(Context context)
IndexLifecycleManager
activate in interface IndexLifecycleManagercontext - used to report progress back to the user or to the logs. Must not be null.
public boolean isIndexingEnabled()
isIndexingEnabled in interface IndexLifecycleManager
public long reIndexAll()
throws IndexException
IssueIndexManager
reIndexAll in interface IssueIndexManagerIndexExceptionpublic long reIndexAll(Context context)
IndexLifecycleManager
reIndexAll in interface IndexLifecycleManagercontext - used to report progress back to the user or to the logs. Must not be null.
public long reIndexIssues(Collection<org.ofbiz.core.entity.GenericValue> issues)
throws IndexException
IssueIndexManagerIssueIndexManager.reIndexIssueObjects(Collection) instead when possible.
reIndexIssues in interface IssueIndexManagerissues - The Issue GenericValues to reindex.
IndexException
public long reIndexIssueObjects(Collection<? extends Issue> issueObjects)
throws IndexException
IssueIndexManager
reIndexIssueObjects in interface IssueIndexManagerissueObjects - Set of Issues to reindex.
IndexException
public void reIndex(Issue issue)
throws IndexException
IssueIndexManager
reIndex in interface IssueIndexManagerIndexException
public void reIndex(org.ofbiz.core.entity.GenericValue issueGV)
throws IndexException
IssueIndexManager
reIndex in interface IssueIndexManagerIndexException
public long reIndexIssues(IssuesIterable issuesIterable,
Context context)
throws IndexException
IssueIndexManager
reIndexIssues in interface IssueIndexManagerissuesIterable - IssuesIterablecontext - used to report progress back to the user or to the logs. Must not be null.
IndexExceptionpublic int size()
size in interface Sizedsize in interface IndexLifecycleManagerIndexLifecycleManager.reIndexAll(Context)public boolean isEmpty()
isEmpty in interface Sized
public long optimize()
throws IndexException
IndexLifecycleManager
optimize in interface IndexLifecycleManagerIndexException - if the indexes are seriously in trouble
public void deIndex(org.ofbiz.core.entity.GenericValue entity)
throws IndexException
IssueIndexManager
deIndex in interface IssueIndexManagerIndexExceptionpublic String getPluginsRootPath()
IssueIndexManager
getPluginsRootPath in interface IssueIndexManagerpublic List<String> getExistingPluginsPaths()
IssueIndexManagerIssueIndexManager.getPluginsRootPath().
If a plugin index root path does not exist, or is empty (no sub-directopries exist) then an empty collection will be returned.
getExistingPluginsPaths in interface IssueIndexManagerpublic Collection<String> getAllIndexPaths()
getAllIndexPaths in interface IndexLifecycleManagerpublic org.apache.lucene.search.IndexSearcher getIssueSearcher()
IssueIndexManagerIndexSearcher 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.
getIssueSearcher in interface IssueIndexManagerpublic org.apache.lucene.search.IndexSearcher getCommentSearcher()
IssueIndexManagerIndexSearcher 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.
getCommentSearcher in interface IssueIndexManagerpublic void shutdown()
IndexLifecycleManager
shutdown in interface IndexLifecycleManagershutdown in interface Shutdownpublic String toString()
toString in class Objectpublic static void flushThreadLocalSearchers()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||