Class ScopeBoost
- java.lang.Object
-
- com.attivio.sdk.search.query.phrase.Phrase
-
- com.attivio.sdk.search.query.phrase.ScopeBoost
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable
public final class ScopeBoost extends Phrase
Boost phrase matches that occur inside a specified scope.NOTE: The scope can be any
Phrase.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.attivio.sdk.search.query.phrase.Phrase
Phrase.Parameter
-
-
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_COMPLETENESS_BOOSTThe default completeness boost.-
Fields inherited from class com.attivio.sdk.search.query.phrase.Phrase
boost, parameters
-
-
Constructor Summary
Constructors Constructor Description ScopeBoost()Constructor.ScopeBoost(Phrase phrase, Phrase scope)Constructor.ScopeBoost(Phrase phrase, java.lang.String scope)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ScopeBoostclone()booleanequals(java.lang.Object other)intgetCompletenessBoost()Get the completeness boost.intgetEndOffset()Get the end offset (0 indexed, exclusive) for this term in the original query string.PhrasegetPhrase()PhrasegetScope()intgetStartOffset()Get the start offset (0 indexed, inclusive) for this term in the original query string.inthashCode()Phraserewrite(PhraseHandler handler)Recursively rewrite this phrase usinghandler.PhraserewriteChildren(PhraseHandler handler)Rewrite any children of this phrase usinghandler.voidsetCompletenessBoost(int value)Set the completeness boost.voidsetParameter(java.lang.String name, java.lang.Object value)Set parameternametovalue.voidsetPhrase(Phrase value)voidsetScope(Phrase value)voidsetScope(java.lang.String value)voidtoString(java.lang.StringBuilder buffer, boolean compact)Appends the string representation of this query tobuffer.-
Methods inherited from class com.attivio.sdk.search.query.phrase.Phrase
containsParameters, containsParameters, copyParameters, getBoost, getParameter, getParameter, getParameter, getParameter, getParameterInternal, isMatchAll, parameters, parseIntParameter, removeParameter, setBoost, setParameters, toArray, toString, toString
-
-
-
-
Field Detail
-
DEFAULT_COMPLETENESS_BOOST
public static final int DEFAULT_COMPLETENESS_BOOST
The default completeness boost.- See Also:
- Constant Field Values
-
-
Method Detail
-
getStartOffset
public int getStartOffset()
Get the start offset (0 indexed, inclusive) for this term in the original query string.This value is set during parsing and indicates the start offset into the original query string that this term represents. In general, offsets should not be set/modified by query transformers and it is recommended that start and end offsets are set to zero when cloning.
NOTE: if
Phrase.getStartOffset()==Phrase.getEndOffset(), this indicates that the term did not come from a parsed query string.- Specified by:
getStartOffsetin classPhrase
-
getEndOffset
public int getEndOffset()
Get the end offset (0 indexed, exclusive) for this term in the original query string.This value is set during parsing and indicates the end offset of the original query string that this term represents. In general, offsets should not be set/modified by query transformers and it is recommended that start and end offsets are set to zero when cloning.
NOTE: if
Phrase.getStartOffset()==Phrase.getEndOffset(), this indicates that the term did not come from a parsed query string.- Specified by:
getEndOffsetin classPhrase
-
getScope
public Phrase getScope()
-
setScope
public void setScope(Phrase value)
-
setScope
public void setScope(java.lang.String value)
-
getPhrase
public Phrase getPhrase()
-
setPhrase
public void setPhrase(Phrase value)
-
getCompletenessBoost
public int getCompletenessBoost()
Get the completeness boost.
-
setCompletenessBoost
public void setCompletenessBoost(int value)
Set the completeness boost.
-
setParameter
public void setParameter(java.lang.String name, java.lang.Object value)Set parameternametovalue.NOTE:
nameis case insensitive.- Overrides:
setParameterin classPhrase
-
rewrite
public Phrase rewrite(PhraseHandler handler)
Recursively rewrite this phrase usinghandler.NOTE: If a phrase has any children, the phrase itself will be passed to
handlerfirst, prior to its children. Ifhandlerreturns a new phrase, its children will not be traversed automatically.
-
rewriteChildren
public Phrase rewriteChildren(PhraseHandler handler)
Rewrite any children of this phrase usinghandler.Returns the modified phrase, which may be
nullif all children were removed byhandler.This method may have no effect if this
Phraserepresents a leaf in the tree.NOTE: child phrases are not recursively traversed.
- Specified by:
rewriteChildrenin classPhrase
-
clone
public ScopeBoost clone()
-
-