Class SearchTemplateRequest

java.lang.Object
co.elastic.clients.elasticsearch._types.RequestBase
co.elastic.clients.elasticsearch.core.SearchTemplateRequest
All Implemented Interfaces:
JsonpSerializable

@JsonpDeserializable public class SearchTemplateRequest extends RequestBase implements JsonpSerializable
Allows to use the Mustache language to pre-render a search definition.
See Also:
  • Field Details

  • Method Details

    • of

    • allowNoIndices

      @Nullable public final Boolean allowNoIndices()
      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

      @Nullable public final Boolean ccsMinimizeRoundtrips()
      Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution

      API name: ccs_minimize_roundtrips

    • expandWildcards

      public final List<ExpandWildcard> expandWildcards()
      Whether to expand wildcard expression to concrete indices that are open, closed or both.

      API name: expand_wildcards

    • explain

      @Nullable public final Boolean explain()
      API name: explain
    • id

      @Nullable public final String id()
      ID of the search template to use. If no source is specified, this parameter is required.

      API name: id

    • ignoreThrottled

      @Nullable public final Boolean ignoreThrottled()
      Whether specified concrete, expanded or aliased indices should be ignored when throttled

      API name: ignore_throttled

    • ignoreUnavailable

      @Nullable public final Boolean ignoreUnavailable()
      Whether specified concrete indices should be ignored when unavailable (missing or closed)

      API name: ignore_unavailable

    • index

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

      API name: index

    • params

      public final Map<String,JsonData> params()
      API name: params
    • preference

      @Nullable public final String preference()
      Specify the node or shard the operation should be performed on (default: random)

      API name: preference

    • profile

      @Nullable public final Boolean profile()
      API name: profile
    • routing

      @Nullable public final String routing()
      Custom value used to route operations to a specific shard.

      API name: routing

    • scroll

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

      API name: scroll

    • searchType

      @Nullable public final SearchType searchType()
      The type of the search operation.

      API name: search_type

    • source

      @Nullable public final String source()
      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

    • serialize

      public void serialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
      Serialize this object to JSON.
      Specified by:
      serialize in interface JsonpSerializable
    • serializeInternal

      protected void serializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
    • setupSearchTemplateRequestDeserializer

      protected static void setupSearchTemplateRequestDeserializer(ObjectDeserializer<SearchTemplateRequest.Builder> op)
    • createSearchTemplateEndpoint

      public static <TDocument> Endpoint<SearchTemplateRequest,SearchTemplateResponse<TDocument>,ErrorResponse> createSearchTemplateEndpoint(JsonpDeserializer<TDocument> tDocumentDeserializer)
      Create an "search_template" endpoint.