Class PhraseQuery
java.lang.Object
com.atlassian.confluence.search.v2.query.PhraseQuery
- All Implemented Interfaces:
Expandable<SearchQuery>
,SearchQuery
A query which matches by phrases.
- Since:
- 5.10
-
Field Summary
Fields inherited from interface com.atlassian.confluence.search.v2.SearchQuery
DEFAULT_BOOST
-
Constructor Summary
ConstructorDescriptionPhraseQuery
(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.PhraseQuery
(String fieldName, String text, int slop, AnalyzerDescriptorProvider analyzerDescriptorProvider, float boost) Create a query which matches by phrases. -
Method Summary
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, getSubClauses
-
Field Details
-
KEY
- See Also:
-
-
Constructor Details
-
PhraseQuery
public PhraseQuery(String fieldName, String text, int slop, AnalyzerDescriptorProvider analyzerDescriptorProvider, float boost) 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.boost
- boost to the scores of matching documents- Since:
- 8.7
-
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
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 Details
-
getFieldName
-
getSlop
public int getSlop() -
getAnalyzerDescriptorProvider
- Since:
- 8.0
-
getKey
- Specified by:
getKey
in interfaceSearchQuery
- Returns:
- the plugin key
-
getParameters
Description copied from interface:SearchQuery
List of parameters asString
s orSearchQuery
s.- Specified by:
getParameters
in interfaceSearchQuery
- Returns:
String
s orSearchQuery
s.
-
getText
-
getBoost
public float getBoost()Description copied from interface:SearchQuery
Return boost factor of this query. It will take effect when the query is used in combination with others e.g. inBooleanQuery
.- Specified by:
getBoost
in interfaceSearchQuery
- Returns:
- boost factor
-
equals
-
hashCode
public int hashCode()
-