Class TrainModelRequest
java.lang.Object
org.opensearch.client.opensearch._types.RequestBase
org.opensearch.client.opensearch.knn.TrainModelRequest
- All Implemented Interfaces:
JsonpSerializable,PlainJsonSerializable,ToCopyableBuilder<TrainModelRequest.Builder,TrainModelRequest>
@JsonpDeserializable
@Generated("org.opensearch.client.codegen.CodeGenerator")
public final class TrainModelRequest
extends RequestBase
implements PlainJsonSerializable, ToCopyableBuilder<TrainModelRequest.Builder,TrainModelRequest>
Create and train a model that can be used for initializing k-NN native library indexes during indexing.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.opensearch.client.opensearch._types.RequestBase
RequestBase.AbstractBuilder<BuilderT extends RequestBase.AbstractBuilder<BuilderT>> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final JsonpDeserializer<TrainModelRequest> Json deserializer forTrainModelRequeststatic final Endpoint<TrainModelRequest, TrainModelResponse, ErrorResponse> Endpoint "knn.train_model". -
Method Summary
Modifier and TypeMethodDescriptionprotected voidapplyQueryParameters(Map<String, String> params) static TrainModelRequest.Builderbuilder()final StringAPI name:compression_levelfinal StringAPI name:descriptionfinal intRequired - API name:dimensionbooleaninthashCode()final IntegerAPI name:max_training_vector_countfinal KnnMethodmethod()API name:methodfinal Stringmode()API name:modefinal StringmodelId()The id of the model.static TrainModelRequestfinal StringPreferred node to execute training.final IntegerAPI name:search_sizevoidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) Serialize this object to JSON.protected voidserializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static voidfinal StringAPI name:spaceTypeCreate a new builderToCopyableBuilderthat is initialised with the current state of this object.final StringRequired - API name:training_fieldfinal StringRequired - API name:training_indexMethods inherited from class org.opensearch.client.opensearch._types.RequestBase
errorTrace, humanMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.opensearch.client.json.PlainJsonSerializable
toJsonStringMethods inherited from interface org.opensearch.client.util.ToCopyableBuilder
copy
-
Field Details
-
_DESERIALIZER
Json deserializer forTrainModelRequest -
_ENDPOINT
Endpoint "knn.train_model".
-
-
Method Details
-
of
public static TrainModelRequest of(Function<TrainModelRequest.Builder, ObjectBuilder<TrainModelRequest>> fn) -
compressionLevel
API name:compression_level -
description
API name:description -
dimension
public final int dimension()Required - API name:dimension -
maxTrainingVectorCount
API name:max_training_vector_count -
method
API name:method -
mode
API name:mode -
modelId
The id of the model.API name:
model_id -
preference
Preferred node to execute training.API name:
preference -
searchSize
API name:search_size -
spaceType
API name:spaceType -
trainingField
Required - API name:training_field -
trainingIndex
Required - API name:training_index -
serialize
Serialize this object to JSON.- Specified by:
serializein interfaceJsonpSerializable
-
serializeInternal
-
toBuilder
Description copied from interface:ToCopyableBuilderCreate a new builderToCopyableBuilderthat is initialised with the current state of this object.- Specified by:
toBuilderin interfaceToCopyableBuilder<TrainModelRequest.Builder,TrainModelRequest> - Returns:
- a new builder instance.
-
builder
-
setupTrainModelRequestDeserializer
protected static void setupTrainModelRequestDeserializer(ObjectDeserializer<TrainModelRequest.Builder> op) -
applyQueryParameters
- Overrides:
applyQueryParametersin classRequestBase
-
hashCode
public int hashCode() -
equals
-