Class FunctionScore

    • Method Detail

      • filter

        @Nullable
        public final Query filter()
        API name: filter
      • weight

        @Nullable
        public final java.lang.Double weight()
        API name: weight
      • isExp

        public boolean isExp()
        Is this variant instance of kind exp?
      • exp

        public DecayFunction exp()
        Get the exp variant value.
        Throws:
        java.lang.IllegalStateException - if the current variant is not of the exp kind.
      • isGauss

        public boolean isGauss()
        Is this variant instance of kind gauss?
      • gauss

        public DecayFunction gauss()
        Get the gauss variant value.
        Throws:
        java.lang.IllegalStateException - if the current variant is not of the gauss kind.
      • isLinear

        public boolean isLinear()
        Is this variant instance of kind linear?
      • linear

        public DecayFunction linear()
        Get the linear variant value.
        Throws:
        java.lang.IllegalStateException - if the current variant is not of the linear kind.
      • isFieldValueFactor

        public boolean isFieldValueFactor()
        Is this variant instance of kind field_value_factor?
      • fieldValueFactor

        public FieldValueFactorScoreFunction fieldValueFactor()
        Get the field_value_factor variant value.
        Throws:
        java.lang.IllegalStateException - if the current variant is not of the field_value_factor kind.
      • isRandomScore

        public boolean isRandomScore()
        Is this variant instance of kind random_score?
      • randomScore

        public RandomScoreFunction randomScore()
        Get the random_score variant value.
        Throws:
        java.lang.IllegalStateException - if the current variant is not of the random_score kind.
      • isScriptScore

        public boolean isScriptScore()
        Is this variant instance of kind script_score?
      • scriptScore

        public ScriptScoreFunction scriptScore()
        Get the script_score variant value.
        Throws:
        java.lang.IllegalStateException - if the current variant is not of the script_score kind.