Class MultiTextFieldQuery
java.lang.Object
com.atlassian.confluence.search.v2.query.MultiTextFieldQuery
- All Implemented Interfaces:
Expandable<SearchQuery>
,SearchQuery
- Direct Known Subclasses:
TextQuery
Represents a query against multiple fields.
-
Field Summary
Fields inherited from interface com.atlassian.confluence.search.v2.SearchQuery
DEFAULT_BOOST
-
Constructor Summary
ConstructorDescriptionMultiTextFieldQuery
(String query, String... fields) Constructs a multi-field query with the operator set toBooleanOperator.AND
.MultiTextFieldQuery
(String query, Set<String> fields, BooleanOperator operator) Constructs a multi-field query with the specified query, fields and operator.MultiTextFieldQuery
(Collection<String> fields, Map<String, ? extends AnalyzerDescriptorProvider> analyzerProviders, BooleanOperator operator, String query) Create a query where a field can be tokenized by a provided analyzer. -
Method Summary
Modifier and TypeMethodDescriptionboolean
expand()
Expands this query into a composite query (that composes other queries).Map<String,
? extends AnalyzerDescriptorProvider> Returns information required to construct analyzer for the query if it is available.getKey()
List of parameters asString
s orSearchQuery
s.getQuery()
int
hashCode()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.atlassian.confluence.search.v2.SearchQuery
getBoost, getSubClauses
-
Constructor Details
-
MultiTextFieldQuery
Constructs a multi-field query with the specified query, fields and operator.- Parameters:
fields
- the fields to query againstoperator
- whether the query must match all termsAND
or any of them {code OR}.query
- the query
-
MultiTextFieldQuery
Constructs a multi-field query with the operator set toBooleanOperator.AND
.- Parameters:
fields
- the fields to query againstquery
- the query
-
MultiTextFieldQuery
public MultiTextFieldQuery(Collection<String> fields, Map<String, ? extends AnalyzerDescriptorProvider> analyzerProviders, BooleanOperator operator, String query) Create a query where a field can be tokenized by a provided analyzer.- Parameters:
fields
- the fields to query againstanalyzerProviders
- specifies a non-standard analyzer for a fieldoperator
- whether the query must match all termsAND
or any of them {code OR}query
- the query- Since:
- 7.0
-
-
Method Details
-
getKey
- Specified by:
getKey
in interfaceSearchQuery
- Returns:
- the plugin key
-
getQuery
-
getUnescapedQuery
-
getFields
-
getAnalyzerProviders
Returns information required to construct analyzer for the query if it is available.- Since:
- 7.0
-
getOperator
-
getParameters
Description copied from interface:SearchQuery
List of parameters asString
s orSearchQuery
s.- Specified by:
getParameters
in interfaceSearchQuery
- Returns:
String
s orSearchQuery
s.
-
expand
Description copied from interface:SearchQuery
Expands 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:
expand
in interfaceExpandable<SearchQuery>
- Specified by:
expand
in interfaceSearchQuery
- Returns:
- a query
-
equals
-
hashCode
public int hashCode()
-