Class MtermvectorsRequest.Builder

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

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

    • Builder

      public Builder()
  • Method Details

    • index

      public MtermvectorsRequest.Builder index​(@Nullable java.lang.String value)
      The index in which the document resides.

      API name: index

    • type

      public MtermvectorsRequest.Builder type​(@Nullable java.lang.String value)
      The type of the document.

      API name: type

    • fields

      public MtermvectorsRequest.Builder fields​(@Nullable java.util.List<java.lang.String> value)
      A comma-separated list of fields to return. Applies to all returned documents unless otherwise specified in body "params" or "docs".

      API name: fields

    • fields

      public MtermvectorsRequest.Builder fields​(java.lang.String... value)
      A comma-separated list of fields to return. Applies to all returned documents unless otherwise specified in body "params" or "docs".

      API name: fields

    • addFields

      public MtermvectorsRequest.Builder addFields​(java.lang.String value)
      Add a value to fields(List), creating the list if needed.
    • fieldStatistics

      public MtermvectorsRequest.Builder fieldStatistics​(@Nullable java.lang.Boolean value)
      Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".

      API name: field_statistics

    • offsets

      public MtermvectorsRequest.Builder offsets​(@Nullable java.lang.Boolean value)
      Specifies if term offsets should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".

      API name: offsets

    • payloads

      public MtermvectorsRequest.Builder payloads​(@Nullable java.lang.Boolean value)
      Specifies if term payloads should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".

      API name: payloads

    • positions

      public MtermvectorsRequest.Builder positions​(@Nullable java.lang.Boolean value)
      Specifies if term positions should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".

      API name: positions

    • preference

      public MtermvectorsRequest.Builder preference​(@Nullable java.lang.String value)
      Specify the node or shard the operation should be performed on (default: random) .Applies to all returned documents unless otherwise specified in body "params" or "docs".

      API name: preference

    • realtime

      public MtermvectorsRequest.Builder realtime​(@Nullable java.lang.Boolean value)
      Specifies if requests are real-time as opposed to near-real-time (default: true).

      API name: realtime

    • routing

      public MtermvectorsRequest.Builder routing​(@Nullable java.lang.String value)
      Specific routing value. Applies to all returned documents unless otherwise specified in body "params" or "docs".

      API name: routing

    • termStatistics

      public MtermvectorsRequest.Builder termStatistics​(@Nullable java.lang.Boolean value)
      Specifies if total term frequency and document frequency should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".

      API name: term_statistics

    • version

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

      API name: version

    • versionType

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

      API name: version_type

    • docs

      public MtermvectorsRequest.Builder docs​(@Nullable java.util.List<Operation> value)
      API name: docs
    • docs

      public MtermvectorsRequest.Builder docs​(Operation... value)
      API name: docs
    • addDocs

      public MtermvectorsRequest.Builder addDocs​(Operation value)
      Add a value to docs(List), creating the list if needed.
    • docs

      public MtermvectorsRequest.Builder docs​(java.util.function.Function<Operation.Builder,​ObjectBuilder<Operation>> fn)
      Set docs(List) to a singleton list.
    • addDocs

      public MtermvectorsRequest.Builder addDocs​(java.util.function.Function<Operation.Builder,​ObjectBuilder<Operation>> fn)
      Add a value to docs(List), creating the list if needed.
    • ids

      public MtermvectorsRequest.Builder ids​(@Nullable java.util.List<java.lang.String> value)
      API name: ids
    • ids

      public MtermvectorsRequest.Builder ids​(java.lang.String... value)
      API name: ids
    • addIds

      public MtermvectorsRequest.Builder addIds​(java.lang.String value)
      Add a value to ids(List), creating the list if needed.
    • build

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