Class SearchTemplateRequest.Builder

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

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

    • Builder

      public Builder()
  • Method Details

    • index

      public SearchTemplateRequest.Builder index​(@Nullable java.util.List<java.lang.String> value)
      Comma-separated list of data streams, indices, and aliases to search. Supports wildcards (*).

      API name: index

    • index

      public SearchTemplateRequest.Builder index​(java.lang.String... value)
      Comma-separated list of data streams, indices, and aliases to search. Supports wildcards (*).

      API name: index

    • addIndex

      public SearchTemplateRequest.Builder addIndex​(java.lang.String value)
      Add a value to index(List), creating the list if needed.
    • type

      public SearchTemplateRequest.Builder type​(@Nullable java.util.List<java.lang.String> value)
      A comma-separated list of document types to search; leave empty to perform the operation on all types

      API name: type

    • type

      public SearchTemplateRequest.Builder type​(java.lang.String... value)
      A comma-separated list of document types to search; leave empty to perform the operation on all types

      API name: type

    • addType

      public SearchTemplateRequest.Builder addType​(java.lang.String value)
      Add a value to type(List), creating the list if needed.
    • allowNoIndices

      public SearchTemplateRequest.Builder allowNoIndices​(@Nullable java.lang.Boolean value)
      Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes _all string or when no indices have been specified)

      API name: allow_no_indices

    • ccsMinimizeRoundtrips

      public SearchTemplateRequest.Builder ccsMinimizeRoundtrips​(@Nullable java.lang.Boolean value)
      Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution

      API name: ccs_minimize_roundtrips

    • expandWildcards

      public SearchTemplateRequest.Builder expandWildcards​(@Nullable java.util.List<ExpandWildcardOptions> value)
      Whether to expand wildcard expression to concrete indices that are open, closed or both.

      API name: expand_wildcards

    • expandWildcards

      public SearchTemplateRequest.Builder expandWildcards​(ExpandWildcardOptions... value)
      Whether to expand wildcard expression to concrete indices that are open, closed or both.

      API name: expand_wildcards

    • addExpandWildcards

      public SearchTemplateRequest.Builder addExpandWildcards​(ExpandWildcardOptions value)
      Add a value to expandWildcards(List), creating the list if needed.
    • ignoreThrottled

      public SearchTemplateRequest.Builder ignoreThrottled​(@Nullable java.lang.Boolean value)
      Whether specified concrete, expanded or aliased indices should be ignored when throttled

      API name: ignore_throttled

    • ignoreUnavailable

      public SearchTemplateRequest.Builder ignoreUnavailable​(@Nullable java.lang.Boolean value)
      Whether specified concrete indices should be ignored when unavailable (missing or closed)

      API name: ignore_unavailable

    • preference

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

      API name: preference

    • routing

      public SearchTemplateRequest.Builder routing​(@Nullable java.lang.String value)
      Custom value used to route operations to a specific shard.

      API name: routing

    • scroll

      public SearchTemplateRequest.Builder scroll​(@Nullable java.lang.String value)
      Specifies how long a consistent view of the index should be maintained for scrolled search.

      API name: scroll

    • searchType

      public SearchTemplateRequest.Builder searchType​(@Nullable SearchType value)
      The type of the search operation.

      API name: search_type

    • typedKeys

      public SearchTemplateRequest.Builder typedKeys​(@Nullable java.lang.Boolean value)
      Specify whether aggregation and suggester names should be prefixed by their respective types in the response

      API name: typed_keys

    • explain

      public SearchTemplateRequest.Builder explain​(@Nullable java.lang.Boolean value)
      API name: explain
    • id

      public SearchTemplateRequest.Builder id​(@Nullable java.lang.String value)
      ID of the search template to use. If no source is specified, this parameter is required.

      API name: id

    • params

      public SearchTemplateRequest.Builder params​(@Nullable java.util.Map<java.lang.String,​JsonData> value)
      API name: params
    • putParams

      public SearchTemplateRequest.Builder putParams​(java.lang.String key, JsonData value)
      Add a key/value to params(Map), creating the map if needed.
    • profile

      public SearchTemplateRequest.Builder profile​(@Nullable java.lang.Boolean value)
      API name: profile
    • source

      public SearchTemplateRequest.Builder source​(@Nullable java.lang.String value)
      An inline search template. Supports the same parameters as the search API's request body. Also supports Mustache variables. If no id is specified, this parameter is required.

      API name: source

    • build

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