Class SearchTemplateRequest
Request for SearchTemplate
https://opensearch.org/docs/latest/opensearch/search-template/
Inheritance
Implements
Inherited Members
Namespace: OpenSearch.Client
Assembly: OpenSearch.Client.dll
Syntax
public class SearchTemplateRequest : PlainRequestBase<SearchTemplateRequestParameters>, ISearchTemplateRequest, IRequest<SearchTemplateRequestParameters>, IRequest, ITypedSearchRequest
Constructors
| Edit this page View SourceSearchTemplateRequest()
/_search/template
Declaration
public SearchTemplateRequest()
SearchTemplateRequest(Indices)
/{index}/_search/template
Declaration
public SearchTemplateRequest(Indices index)
Parameters
Type | Name | Description |
---|---|---|
Indices | index | Optional, accepts null |
Properties
| Edit this page View SourceAllowNoIndices
Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes _all
string or when no indices have
been specified)
Declaration
public bool? AllowNoIndices { get; set; }
Property Value
Type | Description |
---|---|
bool? |
CcsMinimizeRoundtrips
Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution
Declaration
public bool? CcsMinimizeRoundtrips { get; set; }
Property Value
Type | Description |
---|---|
bool? |
ClrType
Declaration
protected Type ClrType { get; set; }
Property Value
Type | Description |
---|---|
Type |
ExpandWildcards
Whether to expand wildcard expression to concrete indices that are open, closed or both.
Declaration
public ExpandWildcards? ExpandWildcards { get; set; }
Property Value
Type | Description |
---|---|
ExpandWildcards? |
Explain
Specify whether to return detailed information about score computation as part of a hit
Declaration
public bool? Explain { get; set; }
Property Value
Type | Description |
---|---|
bool? |
Id
Declaration
public string Id { get; set; }
Property Value
Type | Description |
---|---|
string |
IgnoreThrottled
Whether specified concrete, expanded or aliased indices should be ignored when throttled
Declaration
public bool? IgnoreThrottled { get; set; }
Property Value
Type | Description |
---|---|
bool? |
IgnoreUnavailable
Whether specified concrete indices should be ignored when unavailable (missing or closed)
Declaration
public bool? IgnoreUnavailable { get; set; }
Property Value
Type | Description |
---|---|
bool? |
Params
Declaration
public IDictionary<string, object> Params { get; set; }
Property Value
Type | Description |
---|---|
IDictionary<string, object> |
Preference
Specify the node or shard the operation should be performed on (default: random)
Declaration
public string Preference { get; set; }
Property Value
Type | Description |
---|---|
string |
Profile
Specify whether to profile the query execution
Declaration
public bool? Profile { get; set; }
Property Value
Type | Description |
---|---|
bool? |
Routing
A document is routed to a particular shard in an index using the following formula
shard_num = hash(_routing) % num_primary_shards
OpenSearch will use the document id if not provided.
For requests that are constructed from/for a document OSC will automatically infer the routing key if that document has a JoinField or a routing mapping on for its type exists on ConnectionSettings
Declaration
public Routing Routing { get; set; }
Property Value
Type | Description |
---|---|
Routing |
Scroll
Specify how long a consistent view of the index should be maintained for scrolled search
Declaration
public Time Scroll { get; set; }
Property Value
Type | Description |
---|---|
Time |
SearchType
Search operation type
Declaration
public SearchType? SearchType { get; set; }
Property Value
Type | Description |
---|---|
SearchType? |
Self
Declaration
protected ISearchTemplateRequest Self { get; }
Property Value
Type | Description |
---|---|
ISearchTemplateRequest |
Source
Declaration
public string Source { get; set; }
Property Value
Type | Description |
---|---|
string |
TotalHitsAsInteger
Indicates whether hits.total should be rendered as an integer or an object in the rest search response
Declaration
public bool? TotalHitsAsInteger { get; set; }
Property Value
Type | Description |
---|---|
bool? |
TypedKeys
Specify whether aggregation and suggester names should be prefixed by their respective types in the response
Declaration
public bool? TypedKeys { get; set; }
Property Value
Type | Description |
---|---|
bool? |
Methods
| Edit this page View SourceRequestDefaults(SearchTemplateRequestParameters)
Allows a request implementation to set certain request parameter defaults, use sparingly!
Declaration
protected override sealed void RequestDefaults(SearchTemplateRequestParameters parameters)
Parameters
Type | Name | Description |
---|---|---|
SearchTemplateRequestParameters | parameters |