Class GetResult.AbstractBuilder<TDocument,BuilderT extends GetResult.AbstractBuilder<TDocument,BuilderT>>

java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<BuilderT>
co.elastic.clients.elasticsearch.core.get.GetResult.AbstractBuilder<TDocument,BuilderT>
All Implemented Interfaces:
WithJson<BuilderT>
Direct Known Subclasses:
GetResponse.Builder, GetResult.Builder
Enclosing class:
GetResult<TDocument>

public abstract static class GetResult.AbstractBuilder<TDocument,BuilderT extends GetResult.AbstractBuilder<TDocument,BuilderT>> extends WithJsonObjectBuilderBase<BuilderT>
  • Constructor Details

    • AbstractBuilder

      public AbstractBuilder()
  • Method Details

    • index

      public final BuilderT index(String value)
      Required - The name of the index the document belongs to.

      API name: _index

    • fields

      public final BuilderT fields(Map<String,JsonData> map)
      If the stored_fields parameter is set to true and found is true, it contains the document fields stored in the index.

      API name: fields

      Adds all entries of map to fields.

    • fields

      public final BuilderT fields(String key, JsonData value)
      If the stored_fields parameter is set to true and found is true, it contains the document fields stored in the index.

      API name: fields

      Adds an entry to fields.

    • ignored

      public final BuilderT ignored(List<String> list)
      API name: _ignored

      Adds all elements of list to ignored.

    • ignored

      public final BuilderT ignored(String value, String... values)
      API name: _ignored

      Adds one or more values to ignored.

    • found

      public final BuilderT found(boolean value)
      Required - Indicates whether the document exists.

      API name: found

    • id

      public final BuilderT id(String value)
      Required - The unique identifier for the document.

      API name: _id

    • primaryTerm

      public final BuilderT primaryTerm(@Nullable Long value)
      The primary term assigned to the document for the indexing operation.

      API name: _primary_term

    • routing

      public final BuilderT routing(@Nullable String value)
      The explicit routing, if set.

      API name: _routing

    • seqNo

      public final BuilderT seqNo(@Nullable Long value)
      The sequence number assigned to the document for the indexing operation. Sequence numbers are used to ensure an older version of a document doesn't overwrite a newer version.

      API name: _seq_no

    • source

      public final BuilderT source(@Nullable TDocument value)
      If found is true, it contains the document data formatted in JSON. If the _source parameter is set to false or the stored_fields parameter is set to true, it is excluded.

      API name: _source

    • version

      public final BuilderT version(@Nullable Long value)
      The document version, which is ncremented each time the document is updated.

      API name: _version

    • tDocumentSerializer

      public final BuilderT tDocumentSerializer(@Nullable JsonpSerializer<TDocument> value)
      Serializer for TDocument. If not set, an attempt will be made to find a serializer from the JSON context.
    • self

      protected abstract BuilderT self()
      Specified by:
      self in class WithJsonObjectBuilderBase<BuilderT extends GetResult.AbstractBuilder<TDocument,BuilderT>>