Package com.documentum.fc.client.search
Interface IDfResultRaterConfig
public interface IDfResultRaterConfig
Configures factors used by raters when computing results rating.
-
Method Summary
Modifier and TypeMethodDescriptionfloatgetAttributeWeight(String attrName, String[] attrValues) Gets the relative weight of an attribute when rating a result.Gets the date attribute.floatgetRankConfidence(String sourceName, int sourceType) Gets the rank confidence of a specific source.floatgetSourceBonusAttribute(String sourceName, int sourceType) Gets a specific source confidence bonus for queries with attribute constraint.floatgetSourceBonusFullText(String sourceName, int sourceType) Gets a specific source confidence bonus for queries with full-text constraint.
This value within [0,1] measures how much the results returned by a specific source can be trusted, whether or not they appear relevant to the query.booleanisAttributeValueRequired(String attrName) Indicates whether the value(s) of attributes must be provided to the methodgetAttributeWeight(java.lang.String, java.lang.String[]).booleanisFullTextAttribute(String attrName) Indicates whether an attribute is part of the "full-text" definition.booleanisHeaderAttribute(String attrName) Indicates whether an attribute belongs to the result header.booleanisPrimaryAttribute(String attrName) Indicates whether an attribute is primary.booleanneedsSrcTypeForRankConfidence(String sourceName) Indicates whether the type of sources must be provided to the methodgetRankConfidence(java.lang.String, int).booleanneedsSrcTypeForSrcBonus(String sourceName) Indicates whether the type of sources must be provided to the methodsgetSourceBonusFullText(java.lang.String, int),getSourceBonusAttribute(java.lang.String, int).
-
Method Details
-
getAttributeWeight
Gets the relative weight of an attribute when rating a result. The weight of an attribute is a positive number, and is always relative to the other attributes weight. A weight of 0 negates the effect of the attribute. The neutral weight is 1. For example, if 'object_name' is given a weight=2 and 'subject' is given a weight=1, then 'object_name' is twice as much important as 'subject', but 'object_name' alone is not given a bonus score.
Note: useisAttributeValueRequired(String)to check whether the attribute value(s) is required or if anullvalue is sufficient.- Parameters:
attrName- The name of the attribute.attrValues- The values of the attribute (more than one value in the case of a repeated attribute). In many cases the value is not required, seeisAttributeValueRequired(String).- Returns:
- The attribute relative weight (a positive real number, the neutral weight is 1).
-
isAttributeValueRequired
Indicates whether the value(s) of attributes must be provided to the methodgetAttributeWeight(java.lang.String, java.lang.String[]). If this method returnsfalsethen anullvalue may be provided as parameter ofgetAttributeWeight(java.lang.String, java.lang.String[]).- Parameters:
attrName- The name of the attribute.- Returns:
true, if the attribute value(s) must be provided;falseif anullvalue is sufficient.
-
isFullTextAttribute
Indicates whether an attribute is part of the "full-text" definition. The "full-text" definition is the association of a set of attributes to which the full-text constraints are matched. For example, if 'object_name' and 'abstract' are full-text attributes, then a constraint on full-text will be analyzed in both 'object_name' and 'abstract'.- Parameters:
attrName- The name of the attribute.- Returns:
true, if the attribute is a full-text one;false, otherwise.
-
isPrimaryAttribute
Indicates whether an attribute is primary. A primary attribute has a special meaning when computing results rate. It is an important attribute of a result that contains the main characteristics of the result. Generally the primary attribute is 'object_name'.- Parameters:
attrName- The name of the attribute.- Returns:
true, if the attribute is primary;false, otherwise.
-
getDateAttribute
String getDateAttribute()Gets the date attribute. This attribute contains the result creation date, it may be checked to analyze the currency of the result. Generally the date attribute is 'r_modify_date'.- Returns:
- The date attribute name; or
nullif none.
-
isHeaderAttribute
Indicates whether an attribute belongs to the result header. A header attribute is often consulted first to determine roughly the content of the document. Generally header attributes are 'object_name', 'subject', 'summary', 'abstract', 'keywords'.- Parameters:
attrName- The name of the attribute.- Returns:
true, if the attribute belongs to the result header;false, otherwise.
-
getRankConfidence
Gets the rank confidence of a specific source. This value within [0,1] measures how much the rank provided by a specific source is trusted. A value of 0 means the source rank must be ignored. A value of 1 means the source rank is reliable and must be taken into account.
Note: useneedsSrcTypeForSrcBonus(String)to check whether the source type is required or ifIDfSearchSource.SRC_TYPE_UNDEFINEDvalue is sufficient.- Parameters:
sourceName- The name of the source.sourceType- The type of the source (IDfSearchSource.SRC_TYPE_DOCBASE,IDfSearchSource.SRC_TYPE_EXTERNAL).- Returns:
- The rank confidence of the source (real number within [0,1]).
-
needsSrcTypeForRankConfidence
Indicates whether the type of sources must be provided to the methodgetRankConfidence(java.lang.String, int). If this method returnsfalsethenIDfSearchSource.SRC_TYPE_UNDEFINEDvalue may be provided as parameter of the methodgetRankConfidence(java.lang.String, int).- Parameters:
sourceName- The name of the source.- Returns:
trueif the type of sources must be provided;falseifIDfSearchSource.SRC_TYPE_UNDEFINEDvalue is sufficient.
-
getSourceBonusFullText
Gets a specific source confidence bonus for queries with full-text constraint.
This value within [0,1] measures how much the results returned by a specific source can be trusted, whether or not they appear relevant to the query. A value of 0 means the source has no trust bonus (neutral), the results scores are computed normally without bonus. A value of 0.5 means the results returned by the source will always have at least a rating score of 0.5 (within [0.5,1]). A value of 1 means all results returned by the source must always have a rating score of 1.
In addition, the source confidence bonus can be different between queries with full-text constraint and queries with attribute constraint. For example, a source can have a confidence bonus of 0.3 for queries with full-text constraint, and a confidence bonus of 0 for queries with attribute constraint.
Note: use#isSourceTypeRequired()to check whether the source type is required or ifIDfSearchSource.SRC_TYPE_UNDEFINEDvalue is sufficient.- Parameters:
sourceName- The name of the source.sourceType- The type of the source (IDfSearchSource.SRC_TYPE_DOCBASE,IDfSearchSource.SRC_TYPE_EXTERNAL).- Returns:
- The source confidence bonus for queries with full-text constraint.
-
getSourceBonusAttribute
Gets a specific source confidence bonus for queries with attribute constraint. More details at#getSourceBonusFullText(String)- Parameters:
sourceName- The name of the source.sourceType- The type of the source (IDfSearchSource.SRC_TYPE_DOCBASE,IDfSearchSource.SRC_TYPE_EXTERNAL).- Returns:
- The source confidence bonus for queries with attribute constraint.
-
needsSrcTypeForSrcBonus
Indicates whether the type of sources must be provided to the methodsgetSourceBonusFullText(java.lang.String, int),getSourceBonusAttribute(java.lang.String, int). If this method returnsfalsethenIDfSearchSource.SRC_TYPE_UNDEFINEDvalue may be provided as parameter of these methods.- Parameters:
sourceName- The name of the source.- Returns:
trueif the type of sources must be provided;falseifIDfSearchSource.SRC_TYPE_UNDEFINEDvalue is sufficient.
-