Class MultiTextFieldQuery
- java.lang.Object
-
- com.atlassian.confluence.search.v2.query.MultiTextFieldQuery
-
- All Implemented Interfaces:
Expandable<SearchQuery>
,SearchQuery
- Direct Known Subclasses:
TextQuery
public class MultiTextFieldQuery extends Object implements SearchQuery
Represents a query against multiple fields.
-
-
Field Summary
-
Fields inherited from interface com.atlassian.confluence.search.v2.SearchQuery
DEFAULT_BOOST
-
-
Constructor Summary
Constructors Constructor Description MultiTextFieldQuery(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
SearchQuery
expand()
Expands this query into a composite query (that composes other queries).Map<String,? extends AnalyzerDescriptorProvider>
getAnalyzerProviders()
Returns information required to construct analyzer for the query if it is available.Set<String>
getFields()
String
getKey()
BooleanOperator
getOperator()
List
getParameters()
List of parameters asString
s orSearchQuery
s.String
getQuery()
String
getUnescapedQuery()
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 Detail
-
MultiTextFieldQuery
public MultiTextFieldQuery(String query, Set<String> fields, BooleanOperator operator)
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
public MultiTextFieldQuery(String query, String... fields)
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 Detail
-
getKey
public String getKey()
- Specified by:
getKey
in interfaceSearchQuery
- Returns:
- the plugin key
-
getQuery
public String getQuery()
-
getUnescapedQuery
public String getUnescapedQuery()
-
getAnalyzerProviders
public Map<String,? extends AnalyzerDescriptorProvider> getAnalyzerProviders()
Returns information required to construct analyzer for the query if it is available.- Since:
- 7.0
-
getOperator
public BooleanOperator getOperator()
-
getParameters
public List getParameters()
Description copied from interface:SearchQuery
List of parameters asString
s orSearchQuery
s.- Specified by:
getParameters
in interfaceSearchQuery
- Returns:
String
s orSearchQuery
s.
-
expand
public SearchQuery 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
-
-