Class TextFieldQuery
- java.lang.Object
-
- com.atlassian.confluence.search.v2.query.TextFieldQuery
-
- All Implemented Interfaces:
Expandable<SearchQuery>
,SearchQuery
public class TextFieldQuery extends Object implements SearchQuery
Represents a raw query from the user that may be parsed.
Note: Using this query means that you know the name of fields within your index. This means that your code is bound to the name of fields in the index which could change. Ultimately you should not consider the
TextFieldQuery
part of the public search API.
-
-
Field Summary
Fields Modifier and Type Field Description static String
KEY
-
Fields inherited from interface com.atlassian.confluence.search.v2.SearchQuery
DEFAULT_BOOST
-
-
Constructor Summary
Constructors Constructor Description TextFieldQuery(String fieldName, AnalyzerDescriptorProvider analyzerProvider, BooleanOperator operator, String query)
Construct a query with a custom analyzer.TextFieldQuery(String fieldName, String query, BooleanOperator operator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
Optional<MappingAnalyzerDescriptor>
getAnalyzer(LanguageDescriptor language)
Returns information required to construct analyzer for the query if it is available.AnalyzerDescriptorProvider
getAnalyzerDescriptorProvider()
String
getFieldName()
String
getKey()
BooleanOperator
getOperator()
List
getParameters()
List of parameters asString
s orSearchQuery
s.String
getRawQuery()
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
expand, getBoost, getSubClauses
-
-
-
-
Field Detail
-
KEY
public static final String KEY
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
TextFieldQuery
public TextFieldQuery(String fieldName, String query, BooleanOperator operator)
- Parameters:
fieldName
- the field name in the indexquery
- the raw query string for the fieldoperator
- the operator applied to raw query string. For example, with a rawQuery of "foo bar", specifyingBooleanOperator.AND
means "foo AND bar"
-
TextFieldQuery
public TextFieldQuery(String fieldName, AnalyzerDescriptorProvider analyzerProvider, BooleanOperator operator, String query)
Construct a query with a custom analyzer.- Since:
- 7.0
-
-
Method Detail
-
getKey
public String getKey()
- Specified by:
getKey
in interfaceSearchQuery
- Returns:
- the plugin key
-
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.
-
getFieldName
public String getFieldName()
-
getRawQuery
public String getRawQuery()
-
getUnescapedQuery
public String getUnescapedQuery()
-
getOperator
public BooleanOperator getOperator()
-
getAnalyzerDescriptorProvider
public AnalyzerDescriptorProvider getAnalyzerDescriptorProvider()
-
getAnalyzer
public Optional<MappingAnalyzerDescriptor> getAnalyzer(LanguageDescriptor language)
Returns information required to construct analyzer for the query if it is available.- Since:
- 7.0
-
-