Enum ScoreType

    • Enum Constant Detail

      • WEIGHT

        public static final ScoreType WEIGHT
        Simple static weight score that is added to all documents. Useful to achieve a basic score for the other functions.
      • RANDOM_SCORE

        public static final ScoreType RANDOM_SCORE
        Random score for each document. The document id is used as a random see, so the same document gets the same reproducible score.
      • FIELD_VALUE_FACTOR

        public static final ScoreType FIELD_VALUE_FACTOR
        field value factor scoring can only be applied on numeric score data.
      • SCRIPT_SCORE

        public static final ScoreType SCRIPT_SCORE
        score using custom script. Make sure to provide the required option 'SCRIPT_CODE'.
      • DECAY_GAUSS

        public static final ScoreType DECAY_GAUSS
        Gaussian decay that is calculated on numeric, date or geo-point data values. Required parameters are 'ORIGIN', 'SCALE', 'OFFSET', and 'DECAY'. see ES Function Decay documentation
      • DECAY_LINEAR

        public static final ScoreType DECAY_LINEAR
        Linear decay that is calculated on numeric, date or geo-point data values. Required parameters are 'ORIGIN', 'SCALE', 'OFFSET', and 'DECAY'. see ES Function Decay documentation
      • DECAY_EXP

        public static final ScoreType DECAY_EXP
        Exponential decay that is calculated on numeric, date or geo-point data values. Required parameters are 'ORIGIN', 'SCALE', 'OFFSET', and 'DECAY'. see ES Function Decay documentation
    • Method Detail

      • values

        public static ScoreType[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (ScoreType c : ScoreType.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static ScoreType valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null