public class DefaultTemporaryIndexProvider extends Object implements TemporaryIndexProvider
TemporaryIndexProvider.IndexSearcher<T>
Constructor and Description |
---|
DefaultTemporaryIndexProvider(IndexWriterConfiguration writerConfiguration,
ApplicationProperties applicationProperties,
SearchHandlerManager searchHandlerManager,
IssueFactory issueFactory,
PermissionsFilterGenerator permissionsFilterGenerator,
SearchSortUtil searchSortUtil,
LuceneQueryBuilder luceneQueryBuilder,
DefaultIssueIndexer.CommentRetriever commentRetriever,
DefaultIssueIndexer.ChangeHistoryRetriever changeHistoryRetriever,
DefaultIssueIndexer.WorklogRetriever worklogRetriever,
IssueDocumentFactory issueDocumentFactory,
CommentDocumentFactory commentDocumentFactory,
ChangeHistoryDocumentFactory changeHistoryDocumentFactory,
WorklogDocumentFactory worklogDocumentFactory) |
Modifier and Type | Method and Description |
---|---|
protected IndexingMode |
getDirectFlushingIndexingMode() |
protected AbstractJiraHome |
getJiraHome(File homeDir) |
<T> T |
indexIssuesAndSearch(Collection<? extends Issue> issues,
TemporaryIndexProvider.IndexSearcher<T> indexSearcher)
Create a temporary index, run the callback and return the computed value
|
public DefaultTemporaryIndexProvider(IndexWriterConfiguration writerConfiguration, ApplicationProperties applicationProperties, SearchHandlerManager searchHandlerManager, IssueFactory issueFactory, PermissionsFilterGenerator permissionsFilterGenerator, SearchSortUtil searchSortUtil, LuceneQueryBuilder luceneQueryBuilder, DefaultIssueIndexer.CommentRetriever commentRetriever, DefaultIssueIndexer.ChangeHistoryRetriever changeHistoryRetriever, DefaultIssueIndexer.WorklogRetriever worklogRetriever, IssueDocumentFactory issueDocumentFactory, CommentDocumentFactory commentDocumentFactory, ChangeHistoryDocumentFactory changeHistoryDocumentFactory, WorklogDocumentFactory worklogDocumentFactory)
@Nullable public <T> T indexIssuesAndSearch(@Nonnull Collection<? extends Issue> issues, @Nonnull TemporaryIndexProvider.IndexSearcher<T> indexSearcher) throws SearchException
TemporaryIndexProvider
indexIssuesAndSearch
in interface TemporaryIndexProvider
issues
- issues that will be indexed into the lucene indexindexSearcher
- callback for querying the indexSearchException
- if unable to compute a result of the searchprotected IndexingMode getDirectFlushingIndexingMode()
@Nonnull protected AbstractJiraHome getJiraHome(@Nonnull File homeDir)
Copyright © 2002-2016 Atlassian. All Rights Reserved.