Package com.documentum.fc.client.search

# Interface IDfResultRaterConfig

public interface IDfResultRaterConfig
Configures factors used by raters when computing results rating.

See Also:
  - `IDfResultsManipulator.newPerceptualRaterFactory(IDfResultRaterConfig, IDfPerceptualRaterConfig)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `float`
  `getAttributeWeight(String attrName, String[] attrValues)`
  Gets the relative weight of an attribute when rating a result.
  `String`
  `getDateAttribute()`
  Gets the date attribute.
  `float`
  `getRankConfidence(String sourceName, int sourceType)`
  Gets the rank confidence of a specific source.
  `float`
  `getSourceBonusAttribute(String sourceName, int sourceType)`
  Gets a specific source confidence bonus for queries with attribute constraint.
  `float`
  `getSourceBonusFullText(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.
  `boolean`
  `isAttributeValueRequired(String attrName)`
  Indicates whether the value(s) of attributes must be provided to the method `getAttributeWeight(java.lang.String, java.lang.String[])`.
  `boolean`
  `isFullTextAttribute(String attrName)`
  Indicates whether an attribute is part of the "full-text" definition.
  `boolean`
  `isHeaderAttribute(String attrName)`
  Indicates whether an attribute belongs to the result header.
  `boolean`
  `isPrimaryAttribute(String attrName)`
  Indicates whether an attribute is primary.
  `boolean`
  `needsSrcTypeForRankConfidence(String sourceName)`
  Indicates whether the type of sources must be provided to the method `getRankConfidence(java.lang.String, int)`.
  `boolean`
  `needsSrcTypeForSrcBonus(String sourceName)`
  Indicates whether the type of sources must be provided to the methods `getSourceBonusFullText(java.lang.String, int)`, `getSourceBonusAttribute(java.lang.String, int)`.

- ## Method Details

  - ### getAttributeWeight

    float getAttributeWeight(String attrName, String[] attrValues)
    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: use `isAttributeValueRequired(String)` to check whether the attribute value(s) is required or if a `null` value 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, see `isAttributeValueRequired(String)`.
    Returns:
      The attribute relative weight (a positive real number, the neutral weight is 1).

  - ### isAttributeValueRequired

    boolean isAttributeValueRequired(String attrName)
    Indicates whether the value(s) of attributes must be provided to the method `getAttributeWeight(java.lang.String, java.lang.String[])`. If this method returns `false` then a `null` value may be provided as parameter of `getAttributeWeight(java.lang.String, java.lang.String[])`.
    Parameters:
      `attrName` - The name of the attribute.
    Returns:
      `true`, if the attribute value(s) must be provided; `false` if a `null` value is sufficient.

  - ### isFullTextAttribute

    boolean isFullTextAttribute(String attrName)
    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

    boolean isPrimaryAttribute(String attrName)
    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 `null` if none.

  - ### isHeaderAttribute

    boolean isHeaderAttribute(String attrName)
    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

    float getRankConfidence(String sourceName, int sourceType)
    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: use `needsSrcTypeForSrcBonus(String)` to check whether the source type is required or if `IDfSearchSource.SRC_TYPE_UNDEFINED` value 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

    boolean needsSrcTypeForRankConfidence(String sourceName)
    Indicates whether the type of sources must be provided to the method `getRankConfidence(java.lang.String, int)`. If this method returns `false` then `IDfSearchSource.SRC_TYPE_UNDEFINED` value may be provided as parameter of the method `getRankConfidence(java.lang.String, int)`.
    Parameters:
      `sourceName` - The name of the source.
    Returns:
      `true` if the type of sources must be provided; `false` if `IDfSearchSource.SRC_TYPE_UNDEFINED` value is sufficient.

  - ### getSourceBonusFullText

    float getSourceBonusFullText(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. 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 if `IDfSearchSource.SRC_TYPE_UNDEFINED` value 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

    float getSourceBonusAttribute(String sourceName, int sourceType)
    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

    boolean needsSrcTypeForSrcBonus(String sourceName)
    Indicates whether the type of sources must be provided to the methods `getSourceBonusFullText(java.lang.String, int)`, `getSourceBonusAttribute(java.lang.String, int)`. If this method returns `false` then `IDfSearchSource.SRC_TYPE_UNDEFINED` value may be provided as parameter of these methods.
    Parameters:
      `sourceName` - The name of the source.
    Returns:
      `true` if the type of sources must be provided; `false` if `IDfSearchSource.SRC_TYPE_UNDEFINED` value is sufficient.