Package com.atlassian.jira.search.issue
Class DocumentSearchRequest.Builder
java.lang.Object
com.atlassian.jira.search.issue.DocumentSearchRequest.Builder
- Enclosing class:
DocumentSearchRequest
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaggregation(String name, Aggregation aggregation) aggregations(Map<String, Aggregation> aggregations) build()fieldsToLoad(Collection<String> fieldsToLoad) filterQuery(Query filterQuery) overrideSecurity(boolean overrideSecurity) searcher(ApplicationUser searcher) Sets the track hits option, which defines how the total hits count is calculated.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
searcher
- Parameters:
searcher- the user on whose behalf the search is performed, ornullif the search is anonymous- Since:
- 10.4
-
jqlQuery
- Parameters:
jqlQuery- the JQL query to match documents, must not benull- Since:
- 10.4
-
filterQuery
- Parameters:
filterQuery- an additional query to further restrict results, ornullif no additional query is required- Since:
- 10.4
-
fieldsToLoad
- Parameters:
fieldsToLoad- the fields to load in the result documents, ornullif all fields should be loaded- Since:
- 10.4
-
overrideSecurity
- Parameters:
overrideSecurity-trueif the search should ignore security restrictions,falseotherwise- Since:
- 10.4
-
aggregation
- Parameters:
name- the aggregation nameaggregation- the aggregation to compute aggregated results- Since:
- 10.5
-
aggregations
- Parameters:
aggregations- the aggregations to compute aggregated results- Since:
- 10.5
-
trackHits
Sets the track hits option, which defines how the total hits count is calculated. Only applicable forSearchPlatform.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
-