Interface IssueDocumentSearchService

All Known Implementing Classes:
DefaultIssueDocumentSearchService, TemporaryIssueDocumentSearchService

@PublicApi public interface IssueDocumentSearchService
Allows running advanced searches against the Jira Issue index as opposed to database (SQL) based queries. Use IssueDocumentSearchService if you need to

Replaces

invalid reference
com.atlassian.jira.issue.search.SearchProvider
Since:
10.4
  • Method Details

    • search

      SearchResponse search(DocumentSearchRequest request, PageRequest pageRequest) throws SearchException
      Run a search against the Issue index, loading only a restricted subset of fields for each document.

      Results ordering

      Results are sorted according to Query.getOrderByClause() and query scoring.

      Aggregation

      To compute aggregated results, define DocumentSearchRequest.aggregations(). The aggregation will be computed for all documents matching the query. To return only aggregated results, instantiate pager with new PagerFilter(0)
      Parameters:
      request - Set of parameters to define which index documents should be returned.
      pageRequest - PageRequest to restrict the portion of documents matching the query that will be returned.
      Returns:
      SearchResponse containing index documents with only specific fields loaded
      Throws:
      SearchException - exception thrown when the search fails
    • search

      default SearchResponse search(DocumentSearchRequest request, PagerFilter pager) throws SearchException
      Run a search against the Issue index, loading only a restricted subset of fields for each document.

      Results ordering

      Results are sorted according to Query.getOrderByClause() and query scoring.

      Aggregation

      To compute aggregated results, define DocumentSearchRequest.aggregations(). The aggregation will be computed for all documents matching the query. To return only aggregated results, instantiate pager with new PagerFilter(0)
      Parameters:
      request - Set of parameters to define which index documents should be returned.
      pager - PagerFilter to restrict the portion of documents matching the query that will be returned.
      Returns:
      SearchResponse containing index documents with only specific fields loaded
      Throws:
      SearchException - exception thrown when the search fails
    • searchStream

      Run 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, use search(DocumentSearchRequest, PageRequest) instead, sorting with pagination.

      Aggregation

      To compute aggregated results, define DocumentSearchRequest.aggregations(). The aggregation will be computed for all documents matching the query. To return only aggregated results, instantiate pager with new PagerFilter(0)
      Parameters:
      request - Set of parameters to define which index documents should be returned.
      Returns:
      SearchStreamResponse containing stream of index documents with only specific fields loaded
      Throws:
      SearchException - exception thrown when the search fails
      Since:
      10.6
    • getHitCount

      long getHitCount(ApplicationUser searcher, Query jqlQuery, boolean overrideSecurity) throws SearchException
      Return the number of documents that match the jqlQuery
      Parameters:
      jqlQuery - Query to define which index documents should be counted.
      Returns:
      the number of documents that match the jqlQuery
      Throws:
      SearchException
    • getHitCount

      long getHitCount(ApplicationUser searcher, Query jqlQuery, boolean overrideSecurity, @Nullable Long timeout) throws SearchException
      Return the number of documents that match the jqlQuery
      Parameters:
      jqlQuery - 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