Class PutElserRequest

java.lang.Object
co.elastic.clients.elasticsearch._types.RequestBase
co.elastic.clients.elasticsearch.inference.PutElserRequest
All Implemented Interfaces:
JsonpSerializable

@Deprecated @JsonpDeserializable public class PutElserRequest extends RequestBase implements JsonpSerializable
Deprecated.
8.16.0 The elser service is deprecated and will be removed in a future release. Use the Elasticsearch inference integration instead, with model_id included in the service_settings.
Create an ELSER inference endpoint.

Create an inference endpoint to perform an inference task with the elser service. You can also deploy ELSER by using the Elasticsearch inference integration.

info Your Elasticsearch deployment contains a preconfigured ELSER inference endpoint, you only need to create the enpoint using the API if you want to customize the settings.

The API request will automatically download and deploy the ELSER model if it isn't already downloaded.

info You might see a 502 bad gateway error in the response when using the Kibana Console. This error usually just reflects a timeout, while the model downloads in the background. You can check the download progress in the Machine Learning UI. If using the Python client, you can set the timeout parameter to a higher value.

After creating the endpoint, wait for the model deployment to complete before using it. To verify the deployment status, use the get trained model statistics API. Look for "state": "fully_allocated" in the response and ensure that the "allocation_count" matches the "target_allocation_count". Avoid creating multiple endpoints for the same model unless required, as each endpoint consumes significant resources.

See Also:
  • Field Details

  • Method Details

    • of

      Deprecated.
    • chunkingSettings

      @Nullable public final InferenceChunkingSettings chunkingSettings()
      Deprecated.
      The chunking configuration object.

      API name: chunking_settings

    • elserInferenceId

      public final String elserInferenceId()
      Deprecated.
      Required - The unique identifier of the inference endpoint.

      API name: elser_inference_id

    • service

      public final ElserServiceType service()
      Deprecated.
      Required - The type of service supported for the specified task type. In this case, elser.

      API name: service

    • serviceSettings

      public final ElserServiceSettings serviceSettings()
      Deprecated.
      Required - Settings used to install the inference model. These settings are specific to the elser service.

      API name: service_settings

    • taskType

      public final ElserTaskType taskType()
      Deprecated.
      Required - The type of the inference task that the model will perform.

      API name: task_type

    • serialize

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

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

      protected static void setupPutElserRequestDeserializer(ObjectDeserializer<PutElserRequest.Builder> op)
      Deprecated.