java.lang.Object
co.elastic.clients.elasticsearch._types.query_dsl.FunctionScore
All Implemented Interfaces:
JsonpSerializable, TaggedUnion<java.lang.Object>

@JsonpDeserializable
public class FunctionScore
extends java.lang.Object
implements TaggedUnion<java.lang.Object>, JsonpSerializable
  • Field Details

  • Constructor Details

  • Method Details

    • _type

      public java.lang.String _type()
      Description copied from interface: TaggedUnion
      Get the of the type of the variant held by this union object.
      Specified by:
      _type in interface TaggedUnion<java.lang.Object>
      Returns:
      the variant type
    • _get

      public java.lang.Object _get()
      Specified by:
      _get in interface TaggedUnion<java.lang.Object>
    • filter

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

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

      public jakarta.json.JsonValue exp()
      Get the exp variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the exp kind.
    • gauss

      public jakarta.json.JsonValue gauss()
      Get the gauss variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the gauss kind.
    • linear

      public jakarta.json.JsonValue linear()
      Get the linear variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the linear kind.
    • 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.
    • 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.
    • 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.
    • serialize

      public void serialize​(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
      Specified by:
      serialize in interface JsonpSerializable
    • setupFunctionScoreDeserializer

      protected static void setupFunctionScoreDeserializer​(DelegatingDeserializer<FunctionScore.Builder> op)