Class ExistsRequest.Builder

java.lang.Object
co.elastic.clients.elasticsearch._core.ExistsRequest.Builder
All Implemented Interfaces:
ObjectBuilder<ExistsRequest>
Enclosing class:
ExistsRequest

public static class ExistsRequest.Builder
extends java.lang.Object
implements ObjectBuilder<ExistsRequest>
Builder for ExistsRequest.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • id

      public ExistsRequest.Builder id​(java.lang.String value)
      Required - The document ID

      API name: id

    • index

      public ExistsRequest.Builder index​(java.lang.String value)
      Required - The name of the index

      API name: index

    • type

      public ExistsRequest.Builder type​(@Nullable java.lang.String value)
      The type of the document (use _all to fetch the first document matching the ID across all types)

      API name: type

    • preference

      public ExistsRequest.Builder preference​(@Nullable java.lang.String value)
      Specify the node or shard the operation should be performed on (default: random)

      API name: preference

    • realtime

      public ExistsRequest.Builder realtime​(@Nullable java.lang.Boolean value)
      Specify whether to perform the operation in realtime or search mode

      API name: realtime

    • refresh

      public ExistsRequest.Builder refresh​(@Nullable java.lang.Boolean value)
      Refresh the shard containing the document before performing the operation

      API name: refresh

    • routing

      public ExistsRequest.Builder routing​(@Nullable java.lang.String value)
      Specific routing value

      API name: routing

    • source

      public ExistsRequest.Builder source​(@Nullable jakarta.json.JsonValue value)
      True or false to return the _source field or not, or a list of fields to return

      API name: _source

    • sourceExcludes

      public ExistsRequest.Builder sourceExcludes​(@Nullable java.util.List<java.lang.String> value)
      A list of fields to exclude from the returned _source field

      API name: _source_excludes

    • sourceExcludes

      public ExistsRequest.Builder sourceExcludes​(java.lang.String... value)
      A list of fields to exclude from the returned _source field

      API name: _source_excludes

    • addSourceExcludes

      public ExistsRequest.Builder addSourceExcludes​(java.lang.String value)
      Add a value to sourceExcludes(List), creating the list if needed.
    • sourceIncludes

      public ExistsRequest.Builder sourceIncludes​(@Nullable java.util.List<java.lang.String> value)
      A list of fields to extract and return from the _source field

      API name: _source_includes

    • sourceIncludes

      public ExistsRequest.Builder sourceIncludes​(java.lang.String... value)
      A list of fields to extract and return from the _source field

      API name: _source_includes

    • addSourceIncludes

      public ExistsRequest.Builder addSourceIncludes​(java.lang.String value)
      Add a value to sourceIncludes(List), creating the list if needed.
    • storedFields

      public ExistsRequest.Builder storedFields​(@Nullable java.util.List<java.lang.String> value)
      A comma-separated list of stored fields to return in the response

      API name: stored_fields

    • storedFields

      public ExistsRequest.Builder storedFields​(java.lang.String... value)
      A comma-separated list of stored fields to return in the response

      API name: stored_fields

    • addStoredFields

      public ExistsRequest.Builder addStoredFields​(java.lang.String value)
      Add a value to storedFields(List), creating the list if needed.
    • version

      public ExistsRequest.Builder version​(@Nullable java.lang.Long value)
      Explicit version number for concurrency control

      API name: version

    • versionType

      public ExistsRequest.Builder versionType​(@Nullable VersionType value)
      Specific version type

      API name: version_type

    • build

      public ExistsRequest build()
      Builds a ExistsRequest.
      Specified by:
      build in interface ObjectBuilder<ExistsRequest>
      Throws:
      java.lang.NullPointerException - if some of the required fields are null.