Class TextValueBoost

  • All Implemented Interfaces:
    Boost

    public class TextValueBoost
    extends Object
    implements Boost
    • Constructor Detail

      • TextValueBoost

        public TextValueBoost()
    • Method Detail

      • getType

        public Boost.BoostType getType()
        Description copied from interface: Boost
        Type of boost
        Specified by:
        getType in interface Boost
        Returns:
        The boost type
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • getValue

        public List<String> getValue()
        The value to exact match on.
        Returns:
        the values
      • getOperation

        public Boost.Operation getOperation()
        The arithmetic operation used to combine the original document score with your boost value. Can be add or multiply. Defaults to add.
        Returns:
        The operation
      • getFactor

        public BigDecimal getFactor()
        Description copied from interface: Boost
        Alter the impact of a boost on the score of a document. Must be between 0 and 10. Defaults to 1.0. A negative factor or fractional factor will not deboost a result. The factor parameter multiplies the value of the boost but does not significantly affect the decay function scale.
        Specified by:
        getFactor in interface Boost
        Returns:
        The factor
      • setValue

        public TextValueBoost setValue​(List<String> value)
        The value to exact match on.
        Parameters:
        value - One or more exact values to match on
        Returns:
        this.
      • setOperation

        public TextValueBoost setOperation​(Boost.Operation operation)
        The arithmetic operation used to combine the original document score with your boost value. Can be add or multiply. Defaults to add.
        Parameters:
        operation - The operation to use to boost the score
        Returns:
        this.
      • setFactor

        public TextValueBoost setFactor​(BigDecimal factor)
        Description copied from interface: Boost
        Alter the impact of a boost on the score of a document. Must be between 0 and 10. Defaults to 1.0. A negative factor or fractional factor will not deboost a result. The factor parameter multiplies the value of the boost but does not significantly affect the decay function scale.
        Specified by:
        setFactor in interface Boost
        Parameters:
        factor - A value between (inclusive) 0.0 and 10.0
        Returns:
        this.