public class IndexedBuildResultsSearcherImpl extends Object implements IndexedBuildResultsSearcher
Constructor and Description |
---|
IndexedBuildResultsSearcherImpl() |
IndexedBuildResultsSearcherImpl(Supplier<LucenePermissionChecker.PermissionChecker> permissionChecker) |
Modifier and Type | Method and Description |
---|---|
int |
count(org.apache.lucene.search.Query query)
Counts the number of builds that matches the query
|
org.apache.lucene.document.Document |
findBuildResultByNumberAndKey(PlanKey planKey,
int buildNumber)
Find document identified by plan key and build result.
|
<T> List<T> |
findBuildResultDataByJiraIssueKey(Set<String> issueKeys,
com.google.common.base.Function<org.apache.lucene.document.Document,T> transformation)
Find documents relevant to given set of Jira issue keys and apply transformation.
|
ResultsSummary |
findLatestRelevantBuildResult(PlanIdentifier plan,
Long beforeLastCompletedTimestamp)
Find the last finished build of a plan that completed before given time
|
List<ResultsSummary> |
search(Map<String,String[]> params) |
void |
search(org.apache.lucene.search.Query query,
AbstractDocumentHitCollector collector) |
PartialList<ResultsSummary> |
search(org.apache.lucene.search.Query query,
int maxResults)
Returns a list of
ResultsSummary that matches the query up to maxResults |
<T> PartialList<T> |
search(org.apache.lucene.search.Query query,
int maxResults,
com.google.common.base.Function<org.apache.lucene.document.Document,T> documentParser)
Returns a list of T that matches the query up to maxResults.
|
<T> PartialList<T> |
search(org.apache.lucene.search.Query query,
org.apache.lucene.search.SortField sortField,
int maxResults,
com.google.common.base.Function<org.apache.lucene.document.Document,T> documentParser)
Returns a sorted list of T that matches the query up to maxResults.
|
void |
setBuildResultsSummaryDocumentFactory(BuildResultsSummaryDocumentFactory buildResultsSummaryDocumentFactory) |
void |
setCachedPlanManager(CachedPlanManager cachedPlanManager) |
void |
setLuceneConnection(com.atlassian.bonnie.ILuceneConnection luceneConnection) |
void |
setPlanManager(PlanManager planManager) |
public IndexedBuildResultsSearcherImpl()
public IndexedBuildResultsSearcherImpl(Supplier<LucenePermissionChecker.PermissionChecker> permissionChecker)
@Nullable public ResultsSummary findLatestRelevantBuildResult(@NotNull PlanIdentifier plan, @NotNull Long beforeLastCompletedTimestamp)
IndexedBuildResultsSearcher
findLatestRelevantBuildResult
in interface IndexedBuildResultsSearcher
plan
- Plan to filter build resultsbeforeLastCompletedTimestamp
- timestamp@NotNull public <T> List<T> findBuildResultDataByJiraIssueKey(@NotNull Set<String> issueKeys, @NotNull com.google.common.base.Function<org.apache.lucene.document.Document,T> transformation)
IndexedBuildResultsSearcher
findBuildResultDataByJiraIssueKey
in interface IndexedBuildResultsSearcher
issueKeys
- set of Jira issue keys to narrow down the searchtransformation
- transformation to be applied to found documents@Nullable public org.apache.lucene.document.Document findBuildResultByNumberAndKey(@NotNull PlanKey planKey, int buildNumber)
IndexedBuildResultsSearcher
findBuildResultByNumberAndKey
in interface IndexedBuildResultsSearcher
planKey
- Plan keybuildNumber
- build numberpublic List<ResultsSummary> search(Map<String,String[]> params)
search
in interface IndexedBuildResultsSearcher
@NotNull public PartialList<ResultsSummary> search(@NotNull org.apache.lucene.search.Query query, int maxResults)
IndexedBuildResultsSearcher
ResultsSummary
that matches the query up to maxResultssearch
in interface IndexedBuildResultsSearcher
@NotNull public <T> PartialList<T> search(@NotNull org.apache.lucene.search.Query query, int maxResults, com.google.common.base.Function<org.apache.lucene.document.Document,T> documentParser)
IndexedBuildResultsSearcher
search
in interface IndexedBuildResultsSearcher
@NotNull public <T> PartialList<T> search(@NotNull org.apache.lucene.search.Query query, org.apache.lucene.search.SortField sortField, int maxResults, com.google.common.base.Function<org.apache.lucene.document.Document,T> documentParser)
IndexedBuildResultsSearcher
search
in interface IndexedBuildResultsSearcher
public int count(@NotNull org.apache.lucene.search.Query query)
IndexedBuildResultsSearcher
count
in interface IndexedBuildResultsSearcher
public void search(org.apache.lucene.search.Query query, AbstractDocumentHitCollector collector)
search
in interface IndexedBuildResultsSearcher
public void setLuceneConnection(com.atlassian.bonnie.ILuceneConnection luceneConnection)
public void setBuildResultsSummaryDocumentFactory(BuildResultsSummaryDocumentFactory buildResultsSummaryDocumentFactory)
public void setPlanManager(PlanManager planManager)
public void setCachedPlanManager(CachedPlanManager cachedPlanManager)
Copyright © 2019 Atlassian Software Systems Pty Ltd. All rights reserved.