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.
Constructor and Description |
---|
TextFieldQuery(String fieldName,
com.atlassian.confluence.plugins.index.api.AnalyzerDescriptorProvider analyzerProvider,
BooleanOperator operator,
String query)
Construct a query with a custom analyzer.
|
TextFieldQuery(String fieldName,
String query,
BooleanOperator operator) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
Optional<com.atlassian.confluence.plugins.index.api.AnalyzerDescriptor> |
getAnalyzer(com.atlassian.confluence.plugins.index.api.LanguageDescriptor language)
Returns information required to construct analyzer for the query if it is available.
|
String |
getFieldName() |
String |
getKey() |
BooleanOperator |
getOperator() |
List |
getParameters()
List of parameters as
String s or SearchQuery s. |
String |
getRawQuery() |
String |
getUnescapedQuery() |
int |
hashCode() |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
expand, getBoost
public static final String KEY
public TextFieldQuery(String fieldName, String query, BooleanOperator operator)
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", specifying
BooleanOperator.AND
means "foo AND bar"public TextFieldQuery(String fieldName, com.atlassian.confluence.plugins.index.api.AnalyzerDescriptorProvider analyzerProvider, BooleanOperator operator, String query)
public String getKey()
getKey
in interface SearchQuery
public List getParameters()
SearchQuery
String
s or SearchQuery
s.getParameters
in interface SearchQuery
String
s or SearchQuery
s.public String getFieldName()
public String getRawQuery()
public String getUnescapedQuery()
public BooleanOperator getOperator()
public Optional<com.atlassian.confluence.plugins.index.api.AnalyzerDescriptor> getAnalyzer(com.atlassian.confluence.plugins.index.api.LanguageDescriptor language)
Copyright © 2003–2020 Atlassian. All rights reserved.