Class SearchTemplateRequest.Builder

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

public static class SearchTemplateRequest.Builder
extends ObjectBuilderBase
implements ObjectBuilder<SearchTemplateRequest>
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • allowNoIndices

      public final 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 final 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 final SearchTemplateRequest.Builder expandWildcards​(java.util.List<ExpandWildcard> list)
      Whether to expand wildcard expression to concrete indices that are open, closed or both.

      API name: expand_wildcards

      Adds all elements of list to expandWildcards.

    • expandWildcards

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

      API name: expand_wildcards

      Adds one or more values to expandWildcards.

    • explain

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

      public final 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

    • ignoreThrottled

      public final 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 final SearchTemplateRequest.Builder ignoreUnavailable​(@Nullable java.lang.Boolean value)
      Whether specified concrete indices should be ignored when unavailable (missing or closed)

      API name: ignore_unavailable

    • index

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

      API name: index

      Adds all elements of list to index.

    • index

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

      API name: index

      Adds one or more values to index.

    • params

      public final SearchTemplateRequest.Builder params​(java.util.Map<java.lang.String,​JsonData> map)
      API name: params

      Adds all entries of map to params.

    • params

      public final SearchTemplateRequest.Builder params​(java.lang.String key, JsonData value)
      API name: params

      Adds an entry to params.

    • preference

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

      API name: preference

    • profile

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

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

      API name: routing

    • scroll

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

      API name: scroll

    • scroll

      public final SearchTemplateRequest.Builder scroll​(java.util.function.Function<Time.Builder,​ObjectBuilder<Time>> fn)
      Specifies how long a consistent view of the index should be maintained for scrolled search.

      API name: scroll

    • searchType

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

      API name: search_type

    • source

      public final 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

    • type

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

      API name: type

      Adds all elements of list to type.

    • type

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

      API name: type

      Adds one or more values to type.

    • build

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