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
Strings or SearchQuerys. |
String |
getRawQuery() |
String |
getUnescapedQuery() |
int |
hashCode() |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitexpand, getBoostpublic 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 SearchQuerypublic List getParameters()
SearchQueryStrings or SearchQuerys.getParameters in interface SearchQueryStrings or SearchQuerys.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–2019 Atlassian. All rights reserved.