Package com.atlassian.jira.issue.index
Interface TemporaryIndexProvider
- All Known Implementing Classes:
DefaultTemporaryIndexProvider
@ExperimentalApi
public interface TemporaryIndexProvider
Provides a personal, temporary lucene index that you can query against. Each call creates a new temporary index that is stored on disk.
It's is automatically removed when the call ends.
- Since:
- v6.4
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescription<T> T
indexIssuesAndSearch
(Collection<? extends Issue> issues, TemporaryIndexProvider.IndexSearcher<T> indexSearcher) Create a temporary index, run the callback and return the computed value
-
Method Details
-
indexIssuesAndSearch
@Nullable <T> T indexIssuesAndSearch(@Nonnull Collection<? extends Issue> issues, @Nonnull TemporaryIndexProvider.IndexSearcher<T> indexSearcher) throws SearchException Create a temporary index, run the callback and return the computed value- Parameters:
issues
- issues that will be indexed into the lucene indexindexSearcher
- callback for querying the index- Returns:
- result of the callback
- Throws:
SearchException
- if unable to compute a result of the search
-