@ThreadSafe public class MockIssueIndexer extends Object implements IssueIndexer
IssueIndexer.Analyzers| Modifier and Type | Field and Description |
|---|---|
Collection<Issue> |
indexedIssues |
int |
indexWorkTime |
AtomicInteger |
optimizations |
int |
optimizationWorkTime |
Collection<Issue> |
reIndexedIssues |
| Constructor and Description |
|---|
MockIssueIndexer() |
MockIssueIndexer(int indexSleepTime,
int optimizationSleepTime) |
| 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)
Index the given issues, use whatever is in your arsenal to do it as FAST as possible.
|
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 final int indexWorkTime
public final int optimizationWorkTime
public final Collection<Issue> indexedIssues
public final Collection<Issue> reIndexedIssues
public final AtomicInteger optimizations
public MockIssueIndexer()
public MockIssueIndexer(int indexSleepTime,
int optimizationSleepTime)
public Index.Result indexIssues(@Nonnull EnclosedIterable<Issue> issues, @Nonnull Context context)
IssueIndexerindexIssues in interface IssueIndexerissues - 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)
IssueIndexerindexIssues in interface IssueIndexerissues - An iterable of issues to index.context - for showing the user the current status.issueIndexingParams - parameters describing what should be reindexedpublic Index.Result deindexIssues(@Nonnull EnclosedIterable<Issue> issues, @Nonnull Context context)
IssueIndexerdeindexIssues in interface IssueIndexerissues - An iterable of issues to index.context - for showing the user the current status.public Index.Result reindexIssues(@Nonnull EnclosedIterable<Issue> issues, @Nonnull Context context, IssueIndexingParams issueIndexingParams, boolean conditionalUpdate)
IssueIndexerreindexIssues in interface IssueIndexerissues - 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)
IssueIndexerreindexIssues in interface IssueIndexerissues - 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 indexIssuesBatchMode(@Nonnull EnclosedIterable<Issue> issues, @Nonnull Context context)
IssueIndexerindexIssuesBatchMode in interface IssueIndexerissues - 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)
IssueIndexerindexIssuesBatchMode in interface IssueIndexerissues - An iterable of issues to index.context - for showing the user the current status.issueIndexingParams - parameters describing what should be reindexedpublic Index.Result reindexComments(@Nonnull Collection<Comment> comments, @Nonnull Context context)
IssueIndexerreindexComments in interface IssueIndexercomments - 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 IssueIndexerpublic Index.Result optimize()
optimize in interface IssueIndexerpublic void deleteIndexes()
IssueIndexerdeleteIndexes in interface IssueIndexerpublic void deleteIndexes(IssueIndexingParams issueIndexingParams)
IssueIndexerdeleteIndexes in interface IssueIndexerissueIndexingParams - parameters describing which indexes should be deleted.public void shutdown()
shutdown in interface IssueIndexerpublic org.apache.lucene.search.IndexSearcher openEntitySearcher(IndexDirectoryFactory.Name index)
IssueIndexeropenEntitySearcher in interface IssueIndexerpublic List<String> getIndexPaths()
getIndexPaths in interface IssueIndexerpublic String getIndexRootPath()
getIndexRootPath in interface IssueIndexerCopyright © 2002-2016 Atlassian. All Rights Reserved.