public class NetricsSearchOpts
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
SCORE_IT
Information Theory scoring.
|
static int |
SCORE_MAX
Maximum scoring, maximum of Normal and Reverse.
|
static int |
SCORE_MIN
Minimum scoring, minimum of Normal and Reverse.
|
static int |
SCORE_NORMAL
Normal scoring, look for query in record.
|
static int |
SCORE_REVERSE
Reverse scoring, look for record in query.
|
static int |
SCORE_SYMMETRIC
Symmetric scoring, match query and record.
|
static int |
TIEBREAK_ALIGNMENT
break ties to favor matches closer to beginning of record.
|
static int |
TIEBREAK_FIELDVAL
break ties based on the value of a field.
|
static int |
TIEBREAK_RECID
break ties using record key, guarantees deterministic order.
|
static int |
TIEBREAK_RECLEN
Deprecated, same as TIEBREAK_SCORETYPE Symmetric.
|
static int |
TIEBREAK_SCORETYPE
break ties based on another score type.
|
Constructor and Description |
---|
NetricsSearchOpts()
Create a default set of search options
|
Modifier and Type | Method and Description |
---|---|
void |
addCustomTiebreak(int tiebreakId,
int tiebreakParam)
Can be used to specify how to break ties between two records that have identical textual similarity.
|
void |
baseBgColor(java.lang.String color)
Specify a background non-match color for HTML text.
|
void |
baseColor(java.lang.String color)
Specify a non-match color for HTML text.
|
void |
boldThresh(int val)
Specify the threshold beyond which to bold text.
|
void |
italicsThresh(int val)
Specify the threshold beyond which to italicize text.
|
void |
matchBgColor(java.lang.String color)
Specify a background match color for HTML text.
|
void |
matchColor(java.lang.String color)
Specify a match color for HTML text.
|
void |
maxFontSize(int val)
Specify the maximum font size of matching text.
|
void |
scoreType(int scoreType)
This specifies the type of score to be used for ordering records.
|
void |
setDetailedStats(boolean enabled)
Enable detailed statistics for this search.
|
void |
setEmptyScore(double score)
Sets the score a comparison gets when empty data is encountered.
|
void |
setFailEmptyPred(boolean fail)
Set whether the predicate fails on empty data.
|
void |
setFailInvalidPred(boolean fail)
Set whether the predicate fails on invalid data.
|
void |
setFetchSize(int size)
Tuning parameter, use only on the advice of your TIBCO representative.
|
void |
setGipFiltered(boolean enabled)
Enable gip filtering for this table (default).
|
void |
setInvalidScore(double score)
Sets the score a comparison gets when an error occurs.
|
void |
setMatchesRequested(int matchesRequested)
Set the number of matches returned by the Netrics Server (default 25).
|
void |
setPCSize(int size)
Tuning parameter, use only on the advice of your TIBCO representative.
|
void |
setPhonetic(boolean enabled)
Enable phonetic searches for this table.
|
void |
setPsiFiltered(boolean enabled)
Enable PSI filtering for this table (default).
|
void |
setPsiLookupFields(java.lang.String[] fields)
You should only use this method with the help of your Netrics
technical support representative.
|
void |
setQCSize(int size)
Tuning parameter, use only on the advice of your TIBCO representative.
|
void |
setRlModelName(java.lang.String name)
You should only use this method with the help of your Netrics
technical support representative.
|
void |
setSortFiltered(boolean enabled)
Enable SORT filtering for this table (default).
|
void |
setSortLookupFields(java.lang.String[] fields)
You should only use this method with the help of your Netrics
technical support representative.
|
void |
setStartMatch(int startMatch)
Set the rank of the first match to be returned by the Netrics
Server (default 1).
|
void |
setThesaurusWeight(double weight)
Use the specified thesaurus weight in determining matching records.
|
void |
setVisStyle(int styleNo)
Sets the visualization style you want returned.
|
void |
underlineThresh(int val)
Specify the threshold beyond which to underline text.
|
void |
useAbsoluteCutoff(double val)
Cut off the result set at a specific absolute value.
|
void |
useEphemeralThesaurus(com.netrics.likeit.NetricsBaseThesaurus thes_def)
Use an ephemeral thesaurus in determining matching records.
|
void |
useExactPlusScoreCutoff(int val)
Return all search results which are exact matches plus a fixed number of records which are inexact.
|
void |
useNoCutoff()
Revert to not using a cutoff.
|
void |
usePercentOfTopCutoff(double val)
Return search results whose scores are above a given percentage of the score of the first record.
|
void |
useSimpleGapCutoff(double val)
Return search results until there is gap between adjacent records.
|
void |
useThesaurus(java.lang.String name)
Use the specified thesaurus or combined thesaurus in determining matching records.
|
void |
useWeightedDictionary(java.lang.String name)
Use the specified weighted dictionary in determining matching records.
|
public static final int SCORE_NORMAL
public static final int SCORE_SYMMETRIC
public static final int SCORE_REVERSE
public static final int SCORE_MIN
public static final int SCORE_MAX
public static final int SCORE_IT
public static final int TIEBREAK_RECLEN
public static final int TIEBREAK_RECID
public static final int TIEBREAK_ALIGNMENT
public static final int TIEBREAK_SCORETYPE
public static final int TIEBREAK_FIELDVAL
public NetricsSearchOpts()
public void setFetchSize(int size)
public void setPCSize(int size)
public void setQCSize(int size)
public void setInvalidScore(double score)
NetricsQuery.setInvalidScore(double)
public void setEmptyScore(double score)
NetricsQuery.setEmptyScore(double)
public void setFailEmptyPred(boolean fail)
public void setFailInvalidPred(boolean fail)
public void setSortLookupFields(java.lang.String[] fields)
public void setPsiLookupFields(java.lang.String[] fields)
public void setRlModelName(java.lang.String name)
NetricsSearchResult.getRlScore()
public void setDetailedStats(boolean enabled)
public void setSortFiltered(boolean enabled)
public void setPsiFiltered(boolean enabled)
public void setGipFiltered(boolean enabled)
public void setPhonetic(boolean enabled)
public void setVisStyle(int styleNo)
public void setMatchesRequested(int matchesRequested)
matchesRequested
- The number of matches to returnpublic void setStartMatch(int startMatch)
startMatch
- The rank of the first match.public void scoreType(int scoreType)
NetricsQuery.scoreType(int)
public void useAbsoluteCutoff(double val)
val
- The score at which to cut off returned records.public void useExactPlusScoreCutoff(int val)
val
- The number of records to return in addition to the
exact matches.public void usePercentOfTopCutoff(double val)
val
- The percentage of the first records score for which no
records below that score will be returned.
(Valid range is from 0.0 to 100.0)public void useSimpleGapCutoff(double val)
val
- The percentage of the first record's score which will be used to look for a gap between the scores of consecutive records below which no records will be returned. (Valid range is from 0.0 to 100.0)public void useNoCutoff()
public void baseColor(java.lang.String color)
NetricsSearchResult.getDblCharMatchStrengths(java.lang.String)
, the matching characters can be visualized based on the strength of the match at that position. For instance, the color red can be used to signify a strong match and the color blue can be used to signify a weak match. A gradient between the two colors can then be used to show matches of varying strengths.color
- All colors are specified as they are in an HTML document. The String should have 6 characters, each of which is a hex value (from 0 to F). The first two characters represent red, the second two represent green, and the last two represent blue. This parameter represents the color used to indicate a weak match.NetricsSearchResult.getDblCharMatchStrengths(java.lang.String)
public void matchColor(java.lang.String color)
color
- This parameter represents the color used to indicate a strong match.public void baseBgColor(java.lang.String color)
color
- The background color for a match can also be changed to indicate a match. This parameter represents the background color used to indicate a weak match.public void matchBgColor(java.lang.String color)
color
- This parameter represents the background color used to indicate a strong match.public void maxFontSize(int val)
val
- This parameter represents the HTML font size to use for strong matches (ranges from 0 to 3).public void italicsThresh(int val)
val
- characters with scores of this range or higher (to the
next defined range) are italicized.public void boldThresh(int val)
val
- characters with scores of this range or higher (to the
next defined range) are in bold text.public void underlineThresh(int val)
val
- characters with scores of this range or higher (to the
next defined range) are underlined.public void useWeightedDictionary(java.lang.String name)
name
- Specifies which weighted dictionary to use for the query. The string should be the name of the dictionary as passed to the wdcreate method of the NetricsServerInterface object.NetricsServerInterface.wdcreate(com.netrics.likeit.NetricsWeightedDictionary)
public void useThesaurus(java.lang.String name)
name
- Specifies which thesaurus or combined thesaurus to use for the query. The string should be the name of the thesaurus as passed to the thcreate or cthcreate methods of the NetricsServerInterface object.NetricsServerInterface.thcreate(com.netrics.likeit.NetricsThesaurus)
,
NetricsServerInterface.cthcreate(com.netrics.likeit.NetricsCombinedThesaurus)
public void useEphemeralThesaurus(com.netrics.likeit.NetricsBaseThesaurus thes_def)
thes_def
- A Thesaurus object (any extension of
NetricsBaseThesaurus).NetricsThesaurus
,
NetricsWeightedDictionary
,
NetricsCombinedThesaurus
public void setThesaurusWeight(double weight)
weight
- Specifies a thesaurus weight to use for the query (from 0.0 to 1.0). A weight of 1.0 means that the score associated with a matching thesaurus word will be exactly equivalent to the score which matches the query as entered. If a weight less than 1.0 is given, then the score of records matched based on thesaurus substitutions will be decreased.NetricsServerInterface.thcreate(com.netrics.likeit.NetricsThesaurus)
public void addCustomTiebreak(int tiebreakId, int tiebreakParam)
Tiebreak Id | Description | Paramater | NetricsSearchOpts.TIEBREAK_RECLEN | Deprecated. This is identical to TIBREAK_SCORETYPE on Symmetric score. | ignored |
NetricsSearchOpts.TIEBREAK_RECID | By record key - this can be used to guarantee a stable sort of tied records | ignored |
NetricsSearchOpts.TIEBREAK_ALIGNMENT | By query alignment - records which the query matches closer to the beginning will come first. Can not be used with query expressions. | ingored |
NetricsSearchOpts.TIEBREAK_SCORETYPE | By scoretype - you can tiebreak by a different scoretype than you're sorting on | The scoretype - described in NetricsSearchOpts.sortScore |
NetricsSearchOpts.TIEBREAK_FIELDVAL | By field value - text fields will rank lesser values higher (alphabetically), other field types will rank higher field values higher | The integer value of the field number to use (zero based) |
tiebreakId
- One of the Ids specified in the table above.tiebreakParam
- An int parameter which is explained in the table above.