Class PhraseQuery
- java.lang.Object
-
- com.atlassian.confluence.search.v2.query.PhraseQuery
-
- All Implemented Interfaces:
Expandable<SearchQuery>,SearchQuery
@SearchPrimitive public class PhraseQuery extends Object implements SearchQuery
A query which matches by phrases.- Since:
- 5.10
-
-
Constructor Summary
Constructors Constructor Description PhraseQuery(String fieldName, String text, int slop)Create a query which matches by phrases.PhraseQuery(String fieldName, String text, int slop, AnalyzerDescriptorProvider analyzerDescriptorProvider)Create a query which matches by phrases.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)AnalyzerDescriptorProvidergetAnalyzerDescriptorProvider()StringgetFieldName()StringgetKey()List<?>getParameters()List of parameters asStrings orSearchQuerys.intgetSlop()StringgetText()inthashCode()-
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
-
PhraseQuery
public PhraseQuery(String fieldName, String text, int slop, AnalyzerDescriptorProvider analyzerDescriptorProvider)
Create a query which matches by phrases. Text can be analysed prior to search.- Parameters:
fieldName- the name of the field to querytext- the phrase for matching on the field valueslop- the maximum allowable edit distance of the field value to match the textanalyzerDescriptorProvider- description of how to analyse the text before search. Remaining terms from analysis are positionally incremented by 1 in left to right order.
-
PhraseQuery
public PhraseQuery(String fieldName, String text, int slop)
Create a query which matches by phrases. Text is analysed by Confluence specified analysis prior to search.- Parameters:
fieldName- the name of the field to querytext- the phrase for matching on the field valueslop- the maximum allowable edit distance of the field value to match the text
-
-
Method Detail
-
getFieldName
public String getFieldName()
-
getSlop
public int getSlop()
-
getAnalyzerDescriptorProvider
public AnalyzerDescriptorProvider getAnalyzerDescriptorProvider()
- Since:
- 8.0
-
getKey
public String getKey()
- Specified by:
getKeyin interfaceSearchQuery- Returns:
- the plugin key
-
getParameters
public List<?> getParameters()
Description copied from interface:SearchQueryList of parameters asStrings orSearchQuerys.- Specified by:
getParametersin interfaceSearchQuery- Returns:
Strings orSearchQuerys.
-
getText
public String getText()
-
-