public class DefaultIssueIndexer extends Object implements IssueIndexer
Modifier and Type | Class and Description |
---|---|
static interface |
DefaultIssueIndexer.ChangeHistoryRetriever |
static interface |
DefaultIssueIndexer.CommentRetriever |
static interface |
DefaultIssueIndexer.EntityRetriever<T> |
static interface |
DefaultIssueIndexer.WorklogRetriever |
IssueIndexer.Analyzers
Constructor and Description |
---|
DefaultIssueIndexer(IndexDirectoryFactory indexDirectoryFactory,
DefaultIssueIndexer.CommentRetriever commentRetriever,
DefaultIssueIndexer.ChangeHistoryRetriever changeHistoryRetriever,
DefaultIssueIndexer.WorklogRetriever worklogRetriever,
ApplicationProperties applicationProperties,
IssueDocumentFactory issueDocumentFactory,
CommentDocumentFactory commentDocumentFactory,
ChangeHistoryDocumentFactory changeHistoryDocumentFactory,
WorklogDocumentFactory worklogDocumentFactory,
IssueManager issueManager) |
Modifier and Type | Method and Description |
---|---|
Index.Result |
deindexIssues(EnclosedIterable<Issue> issues,
Context context)
Delete any existing documents for the supplied issues.
|
void |
deleteIndexes()
Delete all indexes.
|
void |
deleteIndexes(IssueIndexingParams issueIndexingParams)
Delete selected indexes.
|
List<String> |
getIndexPaths() |
String |
getIndexRootPath() |
Index.Result |
indexIssues(EnclosedIterable<Issue> issues,
Context context)
Add documents for the supplied issues.
|
Index.Result |
indexIssues(EnclosedIterable<Issue> issues,
Context context,
IssueIndexingParams issueIndexingParams)
Add documents for the supplied issues.
|
Index.Result |
indexIssuesBatchMode(EnclosedIterable<Issue> issues,
Context context)
No other index operations should be called while this method is being called
|
Index.Result |
indexIssuesBatchMode(EnclosedIterable<Issue> issues,
Context context,
IssueIndexingParams issueIndexingParams)
Index the given issues, use whatever is in your arsenal to do it as FAST as possible.
|
org.apache.lucene.search.IndexSearcher |
openEntitySearcher(IndexDirectoryFactory.Name index)
Issue searcher has to be closed after doing stuff.
|
Index.Result |
optimize() |
Index.Result |
reindexComments(Collection<Comment> comments,
Context context)
Reindex a collection of issue comments.
|
Index.Result |
reindexIssues(EnclosedIterable<Issue> issues,
Context context,
boolean reIndexComments,
boolean reIndexChangeHistory,
boolean conditionalUpdate)
Re-index the given issues, delete any existing documents and add new ones.
|
Index.Result |
reindexIssues(EnclosedIterable<Issue> issues,
Context context,
IssueIndexingParams issueIndexingParams,
boolean conditionalUpdate)
Re-index the given issues, delete any existing documents and add new ones.
|
Index.Result |
reindexWorklogs(Collection<Worklog> worklogs,
Context context) |
void |
shutdown() |
public DefaultIssueIndexer(@Nonnull IndexDirectoryFactory indexDirectoryFactory, @Nonnull DefaultIssueIndexer.CommentRetriever commentRetriever, @Nonnull DefaultIssueIndexer.ChangeHistoryRetriever changeHistoryRetriever, @Nonnull DefaultIssueIndexer.WorklogRetriever worklogRetriever, @Nonnull ApplicationProperties applicationProperties, @Nonnull IssueDocumentFactory issueDocumentFactory, @Nonnull CommentDocumentFactory commentDocumentFactory, @Nonnull ChangeHistoryDocumentFactory changeHistoryDocumentFactory, @Nonnull WorklogDocumentFactory worklogDocumentFactory, @Nonnull IssueManager issueManager)
public Index.Result deindexIssues(@Nonnull EnclosedIterable<Issue> issues, @Nonnull Context context)
IssueIndexer
deindexIssues
in interface IssueIndexer
issues
- An iterable of issues to index.context
- for showing the user the current status.public Index.Result indexIssues(@Nonnull EnclosedIterable<Issue> issues, @Nonnull Context context)
IssueIndexer
indexIssues
in interface IssueIndexer
issues
- An iterable of issues to index.context
- for showing the user the current status.public Index.Result indexIssues(@Nonnull EnclosedIterable<Issue> issues, @Nonnull Context context, @Nonnull IssueIndexingParams issueIndexingParams)
IssueIndexer
indexIssues
in interface IssueIndexer
issues
- An iterable of issues to index.context
- for showing the user the current status.issueIndexingParams
- parameters describing what should be reindexedpublic Index.Result indexIssuesBatchMode(@Nonnull EnclosedIterable<Issue> issues, @Nonnull Context context)
indexIssuesBatchMode
in interface IssueIndexer
issues
- An iterable of issues to index.context
- for showing the user the current status.public Index.Result indexIssuesBatchMode(@Nonnull EnclosedIterable<Issue> issues, @Nonnull Context context, @Nonnull IssueIndexingParams issueIndexingParams)
IssueIndexer
indexIssuesBatchMode
in interface IssueIndexer
issues
- An iterable of issues to index.context
- for showing the user the current status.issueIndexingParams
- parameters describing what should be reindexedpublic Index.Result reindexIssues(@Nonnull EnclosedIterable<Issue> issues, @Nonnull Context context, @Nonnull IssueIndexingParams issueIndexingParams, boolean conditionalUpdate)
IssueIndexer
reindexIssues
in interface IssueIndexer
issues
- An iterable of issues to index.context
- for showing the user the current status.issueIndexingParams
- parameters describing what should be reindexedconditionalUpdate
- set to true to use conditional updates when writing to the indexpublic Index.Result reindexIssues(@Nonnull EnclosedIterable<Issue> issues, @Nonnull Context context, boolean reIndexComments, boolean reIndexChangeHistory, boolean conditionalUpdate)
IssueIndexer
reindexIssues
in interface IssueIndexer
issues
- An iterable of issues to index.context
- for showing the user the current status.reIndexComments
- Set to true if you require issue comments to also be reindexed.reIndexChangeHistory
- Set to true if you require issue change history to also be reindexed.conditionalUpdate
- set to true to use conditional updates when writing to the indexpublic Index.Result reindexComments(@Nonnull Collection<Comment> comments, @Nonnull Context context)
IssueIndexer
reindexComments
in interface IssueIndexer
comments
- Comments to be reindexed.context
- for showing the user the current status.public Index.Result reindexWorklogs(@Nonnull Collection<Worklog> worklogs, @Nonnull Context context)
reindexWorklogs
in interface IssueIndexer
public void deleteIndexes()
IssueIndexer
deleteIndexes
in interface IssueIndexer
public void deleteIndexes(@Nonnull IssueIndexingParams issueIndexingParams)
IssueIndexer
deleteIndexes
in interface IssueIndexer
issueIndexingParams
- parameters describing which indexes should be deleted.public org.apache.lucene.search.IndexSearcher openEntitySearcher(IndexDirectoryFactory.Name index)
IssueIndexer
openEntitySearcher
in interface IssueIndexer
public Index.Result optimize()
optimize
in interface IssueIndexer
public void shutdown()
shutdown
in interface IssueIndexer
public List<String> getIndexPaths()
getIndexPaths
in interface IssueIndexer
public String getIndexRootPath()
getIndexRootPath
in interface IssueIndexer
Copyright © 2002-2015 Atlassian. All Rights Reserved.