Class CompletionContext
java.lang.Object
co.elastic.clients.elasticsearch.core.search.CompletionContext
- All Implemented Interfaces:
JsonpSerializable
- See Also:
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionstatic final JsonpDeserializer<CompletionContext>
Json deserializer forCompletionContext
-
Method Summary
Modifier and TypeMethodDescriptionfinal Double
boost()
The factor by which the score of the suggestion should be boosted.final Context
context()
Required - The value of the category to filter/boost on.final List<GeoHashPrecision>
An array of precision values at which neighboring geohashes should be taken into account.static CompletionContext
final GeoHashPrecision
The precision of the geohash to encode the query geo point.final Boolean
prefix()
Whether the category value should be treated as a prefix or not.void
serialize
(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) Serialize this object to JSON.protected void
serializeInternal
(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static void
toString()
-
Field Details
-
_DESERIALIZER
Json deserializer forCompletionContext
-
-
Method Details
-
of
public static CompletionContext of(Function<CompletionContext.Builder, ObjectBuilder<CompletionContext>> fn) -
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
Required - The value of the category to filter/boost on.API name:
context
-
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
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
Whether the category value should be treated as a prefix or not.API name:
prefix
-
serialize
Serialize this object to JSON.- Specified by:
serialize
in interfaceJsonpSerializable
-
serializeInternal
-
toString
-
setupCompletionContextDeserializer
protected static void setupCompletionContextDeserializer(ObjectDeserializer<CompletionContext.Builder> op)
-