Class LabelsQuery
java.lang.Object
com.atlassian.confluence.search.v2.query.LabelsQuery
- All Implemented Interfaces:
Expandable<SearchQuery>,SearchQuery
Allows querying by multiple labels. Results returned must match at least one of the specified labels.
Although user labels is deprecated, each of them will be included as a
PrefixQuery in the should clause of
the final BooleanQuery and all other global labels will be ignored if they are ever included in the input
collection. If none of the user labels is found, each global label (if specified) will be included as a TermQuery
in the final BooleanQuery.- Since:
- 7.20
-
Field Summary
FieldsFields inherited from interface com.atlassian.confluence.search.v2.SearchQuery
DEFAULT_BOOST -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanexpand()Expands this query into a composite query (that composes other queries).getKey()List of parameters asStrings orSearchQuerys.inthashCode()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.atlassian.confluence.search.v2.SearchQuery
getBoost, getSubClauses
-
Field Details
-
KEY
- See Also:
-
-
Constructor Details
-
LabelsQuery
- Parameters:
labels- a set of labels. Namespaced labels such as "my:foo" are permitted. Required.- Throws:
IllegalArgumentException- if labels is null
-
-
Method Details
-
getKey
- Specified by:
getKeyin interfaceSearchQuery- Returns:
- the plugin key
-
getParameters
Description copied from interface:SearchQueryList of parameters asStrings orSearchQuerys.- Specified by:
getParametersin interfaceSearchQuery- Returns:
Strings orSearchQuerys.
-
getLabels
-
expand
Description copied from interface:SearchQueryExpands this query into a composite query (that composes other queries). By overriding this method, one can specify a new query that is composition of the behaviour of the composed queries.- Specified by:
expandin interfaceExpandable<SearchQuery>- Specified by:
expandin interfaceSearchQuery- Returns:
- a query
-
equals
-
hashCode
public int hashCode()
-