Class DocumentSearchRequest.Builder

java.lang.Object
com.atlassian.jira.search.issue.DocumentSearchRequest.Builder
Enclosing class:
DocumentSearchRequest

public static class DocumentSearchRequest.Builder extends Object
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • searcher

      public DocumentSearchRequest.Builder searcher(@Nullable ApplicationUser searcher)
      Parameters:
      searcher - the user on whose behalf the search is performed, or null if the search is anonymous
      Since:
      10.4
    • jqlQuery

      public DocumentSearchRequest.Builder jqlQuery(@Nonnull Query jqlQuery)
      Parameters:
      jqlQuery - the JQL query to match documents, must not be null
      Since:
      10.4
    • filterQuery

      public DocumentSearchRequest.Builder filterQuery(@Nullable Query filterQuery)
      Parameters:
      filterQuery - an additional query to further restrict results, or null if no additional query is required
      Since:
      10.4
    • fieldsToLoad

      public DocumentSearchRequest.Builder fieldsToLoad(@Nullable Collection<String> fieldsToLoad)
      Parameters:
      fieldsToLoad - the fields to load in the result documents, or null if all fields should be loaded
      Since:
      10.4
    • overrideSecurity

      public DocumentSearchRequest.Builder overrideSecurity(boolean overrideSecurity)
      Parameters:
      overrideSecurity - true if the search should ignore security restrictions, false otherwise
      Since:
      10.4
    • aggregation

      public DocumentSearchRequest.Builder aggregation(String name, Aggregation aggregation)
      Parameters:
      name - the aggregation name
      aggregation - the aggregation to compute aggregated results
      Since:
      10.5
    • aggregations

      public DocumentSearchRequest.Builder aggregations(Map<String,Aggregation> aggregations)
      Parameters:
      aggregations - the aggregations to compute aggregated results
      Since:
      10.5
    • trackHits

      public DocumentSearchRequest.Builder trackHits(@Nullable TrackHits trackHits)
      Sets the track hits option, which defines how the total hits count is calculated. Only applicable for SearchPlatform.OPENSEARCH.

      Note that requesting the total hits count (TrackHits.all()) can negatively impact query performance, as it requires visiting all matching documents. However, some use cases, such as aggregations, require visiting all matching documents anyway, in which case the performance impact is negligible.

      If not specified, the default search platform behavior is used.

      Since:
      11.0
    • build

      public DocumentSearchRequest build()