Class NumericValueBoost

  • All Implemented Interfaces:
    Boost

    public class NumericValueBoost
    extends Object
    implements Boost
    Represents a numeric boost value
    • Constructor Detail

      • NumericValueBoost

        public NumericValueBoost()
    • 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
      • getName

        public String getName()
        The boost name
        Specified by:
        getName in interface Boost
        Returns:
        the boost name
      • getValue

        public List<BigDecimal> getValue()
        The value to exact match on.
        Returns:
        The values to match on
      • 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()
        Factor to 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.
        Specified by:
        getFactor in interface Boost
        Returns:
        the factor
      • setValue

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

        public NumericValueBoost 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 NumericValueBoost setFactor​(BigDecimal factor)
        Factor to 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.
        Specified by:
        setFactor in interface Boost
        Parameters:
        factor - The factor
        Returns:
        this.