Class SearchTemplateRequest
- java.lang.Object
-
- org.opensearch.client.opensearch._types.RequestBase
-
- org.opensearch.client.opensearch.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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSearchTemplateRequest.BuilderBuilder forSearchTemplateRequest.-
Nested classes/interfaces inherited from class org.opensearch.client.opensearch._types.RequestBase
RequestBase.AbstractBuilder<BuilderT extends RequestBase.AbstractBuilder<BuilderT>>
-
-
Field Summary
Fields Modifier and Type Field Description static JsonpDeserializer<SearchTemplateRequest>_DESERIALIZERJson deserializer forSearchTemplateRequeststatic SimpleEndpoint<SearchTemplateRequest,?>_ENDPOINTEndpoint "search_template".
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.BooleanallowNoIndices()Whether to ignore if a wildcard indices expression resolves into no concrete indices.java.lang.BooleanccsMinimizeRoundtrips()Indicates 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.java.util.List<ExpandWildcard>expandWildcards()Whether to expand wildcard expression to concrete indices that are open, closed or both.java.lang.Booleanexplain()API name:explainjava.lang.Stringid()ID of the search template to use.java.lang.BooleanignoreThrottled()Whether specified concrete, expanded or aliased indices should be ignored when throttledjava.lang.BooleanignoreUnavailable()Whether specified concrete indices should be ignored when unavailable (missing or closed)java.util.List<java.lang.String>index()Comma-separated list of data streams, indices, and aliases to search.static SearchTemplateRequestof(java.util.function.Function<SearchTemplateRequest.Builder,ObjectBuilder<SearchTemplateRequest>> fn)java.util.Map<java.lang.String,JsonData>params()API name:paramsjava.lang.Stringpreference()Specify the node or shard the operation should be performed on (default: random)java.lang.Booleanprofile()API name:profilejava.lang.Stringrouting()Custom value used to route operations to a specific shard.Timescroll()Specifies how long a consistent view of the index should be maintained for scrolled search.SearchTypesearchType()The 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 voidsetupSearchTemplateRequestDeserializer(ObjectDeserializer<SearchTemplateRequest.Builder> op)java.lang.Stringsource()An inline search template.
-
-
-
Field Detail
-
_DESERIALIZER
public static final JsonpDeserializer<SearchTemplateRequest> _DESERIALIZER
Json deserializer forSearchTemplateRequest
-
_ENDPOINT
public static final SimpleEndpoint<SearchTemplateRequest,?> _ENDPOINT
Endpoint "search_template".
-
-
Method Detail
-
of
public static SearchTemplateRequest of(java.util.function.Function<SearchTemplateRequest.Builder,ObjectBuilder<SearchTemplateRequest>> fn)
-
allowNoIndices
@Nullable public final java.lang.Boolean 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
@Nullable public final java.lang.Boolean ccsMinimizeRoundtrips()
Indicates whether network round-trips should be minimized as part of cross-cluster search requests executionAPI name:
ccs_minimize_roundtrips
-
expandWildcards
public final java.util.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 java.lang.Boolean explain()
API name:explain
-
id
@Nullable public final java.lang.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 java.lang.Boolean ignoreThrottled()
Whether specified concrete, expanded or aliased indices should be ignored when throttledAPI name:
ignore_throttled
-
ignoreUnavailable
@Nullable public final java.lang.Boolean ignoreUnavailable()
Whether specified concrete indices should be ignored when unavailable (missing or closed)API name:
ignore_unavailable
-
index
public final java.util.List<java.lang.String> index()
Comma-separated list of data streams, indices, and aliases to search. Supports wildcards (*).API name:
index
-
params
public final java.util.Map<java.lang.String,JsonData> params()
API name:params
-
preference
@Nullable public final java.lang.String preference()
Specify the node or shard the operation should be performed on (default: random)API name:
preference
-
profile
@Nullable public final java.lang.Boolean profile()
API name:profile
-
routing
@Nullable public final java.lang.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 java.lang.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:
serializein interfaceJsonpSerializable
-
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.
-
-