java.lang.Object
co.elastic.clients.elasticsearch.core.scripts_painless_execute.PainlessContextSetup
All Implemented Interfaces:
JsonpSerializable

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

  • Method Details

    • of

    • document

      public final JsonData document()
      Required - Document that's temporarily indexed in-memory and accessible from the script.

      API name: document

    • index

      public final String index()
      Required - Index containing a mapping that's compatible with the indexed document. You may specify a remote index by prefixing the index with the remote cluster alias. For example, remote1:my_index indicates that you want to run the painless script against the "my_index" index on the "remote1" cluster. This request will be forwarded to the "remote1" cluster if you have configured a connection to that remote cluster.

      NOTE: Wildcards are not accepted in the index expression for this endpoint. The expression *:myindex will return the error "No such remote cluster" and the expression logs* or remote1:logs* will return the error "index not found".

      API name: index

    • query

      @Nullable public final Query query()
      Use this parameter to specify a query for computing a score.

      API name: query

    • 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
    • setupPainlessContextSetupDeserializer

      protected static void setupPainlessContextSetupDeserializer(ObjectDeserializer<PainlessContextSetup.Builder> op)