Class DateValueBoost

  • All Implemented Interfaces:
    Boost

    public class DateValueBoost
    extends Object
    implements Boost
    Represents a boost on a date value
    • Constructor Detail

      • DateValueBoost

        public DateValueBoost()
    • Method Detail

      • getName

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

        public List<OffsetDateTime> getValue()
        The value to exact match on.
        Returns:
        A List of dates
      • 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
      • setName

        public DateValueBoost setName​(String name)
        The name of the boost
        Specified by:
        setName in interface Boost
        Parameters:
        name - The boost name
        Returns:
        this.
      • setValue

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

        public DateValueBoost 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 DateValueBoost 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 - A value between (inclusive) 0.0 and 10.0
        Returns:
        this.