Class SearchTemplateRequest
java.lang.Object
org.opensearch.client.opensearch._types.RequestBase
org.opensearch.client.opensearch.core.SearchTemplateRequest
- All Implemented Interfaces:
JsonpSerializable,PlainJsonSerializable
@JsonpDeserializable
public class SearchTemplateRequest
extends RequestBase
implements PlainJsonSerializable
Allows to use the Mustache language to pre-render a search definition.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.opensearch.client.opensearch._types.RequestBase
RequestBase.AbstractBuilder<BuilderT extends RequestBase.AbstractBuilder<BuilderT>> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final JsonpDeserializer<SearchTemplateRequest> Json deserializer forSearchTemplateRequeststatic final SimpleEndpoint<SearchTemplateRequest, ?> Endpoint "search_template". -
Method Summary
Modifier and TypeMethodDescriptionfinal BooleanWhether to ignore if a wildcard indices expression resolves into no concrete indices.final BooleanIndicates whether network round-trips should be minimized as part of cross-cluster search requests executionstatic <TDocument>
Endpoint<SearchTemplateRequest, SearchTemplateResponse<TDocument>, ErrorResponse> createSearchTemplateEndpoint(JsonpDeserializer<TDocument> tDocumentDeserializer) Create an "search_template" endpoint.final List<ExpandWildcard> Whether to expand wildcard expression to concrete indices that are open, closed or both.final Booleanexplain()API name:explainfinal Stringid()ID of the search template to use.final BooleanWhether specified concrete, expanded or aliased indices should be ignored when throttledfinal BooleanWhether specified concrete indices should be ignored when unavailable (missing or closed)index()Comma-separated list of data streams, indices, and aliases to search.static SearchTemplateRequestparams()API name:paramsfinal BooleanIndicates whether search phase took times should be returned in SearchResponsefinal Stringpipeline()Specifies search pipeline namefinal StringSpecify the node or shard the operation should be performed on (default: random)final Booleanprofile()API name:profilefinal Stringrouting()Custom value used to route operations to a specific shard.final Timescroll()Specifies how long a consistent view of the index should be maintained for scrolled search.final SearchTypeThe type of the search operation.voidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) Serialize this object to JSON.protected voidserializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static voidfinal Stringsource()An inline search template.Methods inherited from class org.opensearch.client.opensearch._types.RequestBase
applyQueryParameters, errorTrace, humanMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.opensearch.client.json.PlainJsonSerializable
toJsonString
-
Field Details
-
_DESERIALIZER
Json deserializer forSearchTemplateRequest -
_ENDPOINT
Endpoint "search_template".
-
-
Method Details
-
of
public static SearchTemplateRequest of(Function<SearchTemplateRequest.Builder, ObjectBuilder<SearchTemplateRequest>> fn) -
allowNoIndices
Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes_allstring or when no indices have been specified)API name:
allow_no_indices -
ccsMinimizeRoundtrips
Indicates whether network round-trips should be minimized as part of cross-cluster search requests executionAPI name:
ccs_minimize_roundtrips -
phaseTook
Indicates whether search phase took times should be returned in SearchResponseAPI name:
phase_took -
pipeline
Specifies search pipeline nameAPI name:
pipeline -
expandWildcards
Whether to expand wildcard expression to concrete indices that are open, closed or both.API name:
expand_wildcards -
explain
API name:explain -
id
ID of the search template to use. If no source is specified, this parameter is required.API name:
id -
ignoreThrottled
Whether specified concrete, expanded or aliased indices should be ignored when throttledAPI name:
ignore_throttled -
index
Comma-separated list of data streams, indices, and aliases to search. Supports wildcards (*).API name:
index -
params
API name:params -
preference
Specify the node or shard the operation should be performed on (default: random)API name:
preference -
profile
API name:profile -
routing
Custom value used to route operations to a specific shard.API name:
routing -
scroll
Specifies how long a consistent view of the index should be maintained for scrolled search.API name:
scroll -
searchType
The type of the search operation.API name:
search_type -
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
Serialize this object to JSON.- Specified by:
serializein interfaceJsonpSerializable
-
serializeInternal
-
toBuilder
-
setupSearchTemplateRequestDeserializer
protected static void setupSearchTemplateRequestDeserializer(ObjectDeserializer<SearchTemplateRequest.Builder> op) -
createSearchTemplateEndpoint
public static <TDocument> Endpoint<SearchTemplateRequest,SearchTemplateResponse<TDocument>, createSearchTemplateEndpointErrorResponse> (JsonpDeserializer<TDocument> tDocumentDeserializer) Create an "search_template" endpoint.
-