Package com.atlassian.jira.search.issue
Class TemporaryIssueDocumentSearchService
java.lang.Object
com.atlassian.jira.search.issue.TemporaryIssueDocumentSearchService
- All Implemented Interfaces:
IssueDocumentSearchService
@Internal
public class TemporaryIssueDocumentSearchService
extends Object
implements IssueDocumentSearchService
-
Constructor Summary
ConstructorsConstructorDescriptionTemporaryIssueDocumentSearchService(IndexSearcher temporaryIndexSearcher, DefaultQueryFactory queryFactory, QuerySortExtractor querySortExtractor) -
Method Summary
Modifier and TypeMethodDescriptionlonggetHitCount(ApplicationUser searcher, Query jqlQuery, boolean overrideSecurity) Return the number of documents that match thejqlQuerylonggetHitCount(ApplicationUser searcher, Query jqlQuery, boolean overrideSecurity, Long timeout) Return the number of documents that match thejqlQuerysearch(DocumentSearchRequest request, PageRequest pageRequest) Run a search against the Issue index, loading only a restricted subset of fields for each document.searchStream(DocumentSearchRequest request) Run a search against the Issue index, loading only a restricted subset of fields for each document.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.atlassian.jira.search.issue.IssueDocumentSearchService
search
-
Constructor Details
-
TemporaryIssueDocumentSearchService
public TemporaryIssueDocumentSearchService(IndexSearcher temporaryIndexSearcher, DefaultQueryFactory queryFactory, QuerySortExtractor querySortExtractor)
-
-
Method Details
-
search
public SearchResponse search(DocumentSearchRequest request, PageRequest pageRequest) throws SearchException Description copied from interface:IssueDocumentSearchServiceRun a search against the Issue index, loading only a restricted subset of fields for each document.Results ordering
Results are sorted according toQuery.getOrderByClause()and query scoring.Aggregation
To compute aggregated results, defineDocumentSearchRequest.aggregations(). The aggregation will be computed for all documents matching thequery. To return only aggregated results, instantiatepagerwithnew PagerFilter(0)- Specified by:
searchin interfaceIssueDocumentSearchService- Parameters:
request- Set of parameters to define which index documents should be returned.pageRequest- PageRequest to restrict the portion of documents matching thequerythat will be returned.- Returns:
SearchResponsecontaining index documents with only specific fields loaded- Throws:
SearchException- exception thrown when the search fails
-
searchStream
Description copied from interface:IssueDocumentSearchServiceRun a search against the Issue index, loading only a restricted subset of fields for each document. The search hits are returned as a stream, which is memory efficient for handling a large number of hits.Results ordering
Sorting is not supported when streaming results. If sorting is required, useIssueDocumentSearchService.search(DocumentSearchRequest, PageRequest)instead, sorting with pagination.Aggregation
To compute aggregated results, defineDocumentSearchRequest.aggregations(). The aggregation will be computed for all documents matching thequery. To return only aggregated results, instantiatepagerwithnew PagerFilter(0)- Specified by:
searchStreamin interfaceIssueDocumentSearchService- Parameters:
request- Set of parameters to define which index documents should be returned.- Returns:
SearchStreamResponsecontaining stream of index documents with only specific fields loaded- Throws:
SearchException- exception thrown when the search fails
-
getHitCount
public long getHitCount(ApplicationUser searcher, Query jqlQuery, boolean overrideSecurity) throws SearchException Description copied from interface:IssueDocumentSearchServiceReturn the number of documents that match thejqlQuery- Specified by:
getHitCountin interfaceIssueDocumentSearchServicejqlQuery- Query to define which index documents should be counted.- Returns:
- the number of documents that match the
jqlQuery - Throws:
SearchException
-
getHitCount
public long getHitCount(ApplicationUser searcher, Query jqlQuery, boolean overrideSecurity, @Nullable Long timeout) throws SearchException Description copied from interface:IssueDocumentSearchServiceReturn the number of documents that match thejqlQuery- Specified by:
getHitCountin interfaceIssueDocumentSearchServicejqlQuery- Query to define which index documents should be counted.timeout- Query timeout in milliseconds- Returns:
- the number of documents that match the
jqlQuery - Throws:
SearchException- exception thrown when the search fails
-