Class CompletionContext

java.lang.Object
co.elastic.clients.elasticsearch.core.search.CompletionContext
All Implemented Interfaces:
JsonpSerializable

@JsonpDeserializable public class CompletionContext extends Object implements JsonpSerializable
See Also:
  • Field Details

  • Method Details

    • of

    • boost

      @Nullable public final Double boost()
      The factor by which the score of the suggestion should be boosted. The score is computed by multiplying the boost with the suggestion weight.

      API name: boost

    • context

      public final Context context()
      Required - The value of the category to filter/boost on.

      API name: context

    • neighbours

      public final List<GeoHashPrecision> neighbours()
      An array of precision values at which neighboring geohashes should be taken into account. Precision value can be a distance value (5m, 10km, etc.) or a raw geohash precision (1..12). Defaults to generating neighbors for index time precision level.

      API name: neighbours

    • precision

      @Nullable public final GeoHashPrecision precision()
      The precision of the geohash to encode the query geo point. Can be specified as a distance value (5m, 10km, etc.), or as a raw geohash precision (1..12). Defaults to index time precision level.

      API name: precision

    • prefix

      @Nullable public final Boolean prefix()
      Whether the category value should be treated as a prefix or not.

      API name: prefix

    • serialize

      public void serialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
      Serialize this object to JSON.
      Specified by:
      serialize in interface JsonpSerializable
    • serializeInternal

      protected void serializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • setupCompletionContextDeserializer

      protected static void setupCompletionContextDeserializer(ObjectDeserializer<CompletionContext.Builder> op)