Package com.tibco.patterns.qbp
Class TextQueryDef
- java.lang.Object
-
- com.tibco.patterns.qbp.QueryDef
-
- com.tibco.patterns.qbp.TextQueryDef
-
- Direct Known Subclasses:
CognateQueryDef,SimpleQueryDef
public class TextQueryDef extends QueryDef
Common definitions for text-based querylets: Simple and Cognate.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedTextQueryDef()Prevents direct instantiation.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TextQueryDefemptyScore(java.lang.Double emptyScore)java.util.Optional<java.lang.Double>getEmptyScore()java.util.Optional<java.lang.Integer>getScoreType()java.util.Optional<java.lang.String>getThesaurusName()java.util.Optional<java.lang.Double>getThesaurusWeight()java.util.Optional<java.lang.Boolean>isMatchEmpty()TextQueryDefmatchEmpty(java.lang.Boolean matchEmpty)TextQueryDefscoreType(java.lang.Integer scoreType)TextQueryDefthesaurus(java.lang.String thesName, java.lang.Double thesWeight)Sets the thesaurus information.-
Methods inherited from class com.tibco.patterns.qbp.QueryDef
getGroupName, getQueryName, groupName, queryName
-
-
-
-
Method Detail
-
thesaurus
public TextQueryDef thesaurus(java.lang.String thesName, java.lang.Double thesWeight)
Sets the thesaurus information.- Parameters:
thesName- - name of the thesaurus to use, null if none. If empty string, null is assigned. If this matches a default thesaurus item name it is translated to the current name.thesWeight- penalty factor for thesaurus matches. If null must default to 1.0. The weight is used only if the thesaurus name is given.- Throws:
java.lang.IllegalArgumentException- if thesaurus_weight is given and it is not between 0.0 and 1.0.
-
getThesaurusName
public java.util.Optional<java.lang.String> getThesaurusName()
- Returns:
- the thesaurus name, or empty Optional if no thesaurus is used. Never an empty string.
-
getThesaurusWeight
public java.util.Optional<java.lang.Double> getThesaurusWeight()
- Returns:
- the thesaurus weight, or empty Optional if no weight is specified and the default 1.0 weight must be used.
-
matchEmpty
public TextQueryDef matchEmpty(java.lang.Boolean matchEmpty)
- Parameters:
matchEmpty- the Match Empty Values property to set, or null to use the default (false).
-
isMatchEmpty
public java.util.Optional<java.lang.Boolean> isMatchEmpty()
- Returns:
- the Match Empty Values property, or empty Optional if the default (false) is used.
-
emptyScore
public TextQueryDef emptyScore(java.lang.Double emptyScore)
- Parameters:
emptyScore- the score to assign if the record or query data is empty, or null to use the default empty score.- Throws:
java.lang.IllegalArgumentException- the value is given and not between 0.0 and 1.0 or -1.0.
-
getEmptyScore
public java.util.Optional<java.lang.Double> getEmptyScore()
- Returns:
- the empty score, or empty Optional if the default is used.
-
scoreType
public TextQueryDef scoreType(java.lang.Integer scoreType)
- Parameters:
scoreType- the score type to set. Must be one of the score types defined in NetricsSearchOpts. If null defaults to SCORE_NORMAL.
-
getScoreType
public java.util.Optional<java.lang.Integer> getScoreType()
- Returns:
- the score type, or empty Optional if the default is used.
-
-