Class SearchTemplateDescriptor<TDocument>
Descriptor for SearchTemplate
https://opensearch.org/docs/latest/opensearch/search-template/
Inheritance
SearchTemplateDescriptor<TDocument>
Assembly: OpenSearch.Client.dll
Syntax
public class SearchTemplateDescriptor<TDocument> : RequestDescriptorBase<SearchTemplateDescriptor<TDocument>, SearchTemplateRequestParameters, ISearchTemplateRequest>, IDescriptor, ISearchTemplateRequest, IRequest<SearchTemplateRequestParameters>, IRequest, ITypedSearchRequest where TDocument : class
Type Parameters
Name |
Description |
TDocument |
|
Constructors
|
Edit this page
View Source
SearchTemplateDescriptor()
/{index}/_search/template
Declaration
public SearchTemplateDescriptor()
|
Edit this page
View Source
SearchTemplateDescriptor(Indices)
/{index}/_search/template
Declaration
public SearchTemplateDescriptor(Indices index)
Parameters
Type |
Name |
Description |
Indices |
index |
Optional, accepts null
|
Methods
|
Edit this page
View Source
AllIndices()
A shortcut into calling Index(Indices.All)
Declaration
public SearchTemplateDescriptor<TDocument> AllIndices()
Returns
|
Edit this page
View Source
AllowNoIndices(bool?)
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 SearchTemplateDescriptor<TDocument> AllowNoIndices(bool? allownoindices = true)
Parameters
Type |
Name |
Description |
bool? |
allownoindices |
|
Returns
|
Edit this page
View Source
CcsMinimizeRoundtrips(bool?)
Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution
Declaration
public SearchTemplateDescriptor<TDocument> CcsMinimizeRoundtrips(bool? ccsminimizeroundtrips = true)
Parameters
Type |
Name |
Description |
bool? |
ccsminimizeroundtrips |
|
Returns
|
Edit this page
View Source
ExpandWildcards(ExpandWildcards?)
Whether to expand wildcard expression to concrete indices that are open, closed or both.
Declaration
public SearchTemplateDescriptor<TDocument> ExpandWildcards(ExpandWildcards? expandwildcards)
Parameters
Returns
|
Edit this page
View Source
Explain(bool?)
Specify whether to return detailed information about score computation as part of a hit
Declaration
public SearchTemplateDescriptor<TDocument> Explain(bool? explain = true)
Parameters
Type |
Name |
Description |
bool? |
explain |
|
Returns
|
Edit this page
View Source
Id(string)
Declaration
public SearchTemplateDescriptor<TDocument> Id(string id)
Parameters
Type |
Name |
Description |
string |
id |
|
Returns
|
Edit this page
View Source
IgnoreThrottled(bool?)
Whether specified concrete, expanded or aliased indices should be ignored when throttled
Declaration
public SearchTemplateDescriptor<TDocument> IgnoreThrottled(bool? ignorethrottled = true)
Parameters
Type |
Name |
Description |
bool? |
ignorethrottled |
|
Returns
|
Edit this page
View Source
IgnoreUnavailable(bool?)
Whether specified concrete indices should be ignored when unavailable (missing or closed)
Declaration
public SearchTemplateDescriptor<TDocument> IgnoreUnavailable(bool? ignoreunavailable = true)
Parameters
Type |
Name |
Description |
bool? |
ignoreunavailable |
|
Returns
|
Edit this page
View Source
Index(Indices)
A comma-separated list of index names to search; use the special string _all
or Indices.All to perform the operation on all indices
Declaration
public SearchTemplateDescriptor<TDocument> Index(Indices index)
Parameters
Type |
Name |
Description |
Indices |
index |
|
Returns
|
Edit this page
View Source
Index<TOther>()
a shortcut into calling Index(typeof(TOther))
Declaration
public SearchTemplateDescriptor<TDocument> Index<TOther>() where TOther : class
Returns
Type Parameters
|
Edit this page
View Source
Params(Dictionary<string, object>)
Declaration
public SearchTemplateDescriptor<TDocument> Params(Dictionary<string, object> paramDictionary)
Parameters
Returns
|
Edit this page
View Source
Params(Func<FluentDictionary<string, object>, FluentDictionary<string, object>>)
Declaration
public SearchTemplateDescriptor<TDocument> Params(Func<FluentDictionary<string, object>, FluentDictionary<string, object>> paramDictionary)
Parameters
Returns
|
Edit this page
View Source
Preference(string)
Specify the node or shard the operation should be performed on (default: random)
Declaration
public SearchTemplateDescriptor<TDocument> Preference(string preference)
Parameters
Type |
Name |
Description |
string |
preference |
|
Returns
|
Edit this page
View Source
Profile(bool?)
Specify whether to profile the query execution
Declaration
public SearchTemplateDescriptor<TDocument> Profile(bool? profile = true)
Parameters
Type |
Name |
Description |
bool? |
profile |
|
Returns
|
Edit this page
View Source
RequestDefaults(SearchTemplateRequestParameters)
Allows a request implementation to set certain request parameter defaults, use sparingly!
Declaration
protected override sealed void RequestDefaults(SearchTemplateRequestParameters parameters)
Parameters
Overrides
|
Edit this page
View Source
Routing(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 SearchTemplateDescriptor<TDocument> Routing(Routing routing)
Parameters
Type |
Name |
Description |
Routing |
routing |
|
Returns
|
Edit this page
View Source
Specify how long a consistent view of the index should be maintained for scrolled search
Declaration
public SearchTemplateDescriptor<TDocument> Scroll(Time scroll)
Parameters
Type |
Name |
Description |
Time |
scroll |
|
Returns
|
Edit this page
View Source
SearchType(SearchType?)
Declaration
public SearchTemplateDescriptor<TDocument> SearchType(SearchType? searchtype)
Parameters
Returns
|
Edit this page
View Source
Source(string)
Declaration
public SearchTemplateDescriptor<TDocument> Source(string template)
Parameters
Type |
Name |
Description |
string |
template |
|
Returns
|
Edit this page
View Source
TotalHitsAsInteger(bool?)
Indicates whether hits.total should be rendered as an integer or an object in the rest search response
Declaration
public SearchTemplateDescriptor<TDocument> TotalHitsAsInteger(bool? totalhitsasinteger = true)
Parameters
Type |
Name |
Description |
bool? |
totalhitsasinteger |
|
Returns
|
Edit this page
View Source
TypedKeys(bool?)
Specify whether aggregation and suggester names should be prefixed by their respective types in the response
Declaration
public SearchTemplateDescriptor<TDocument> TypedKeys(bool? typedkeys = true)
Parameters
Type |
Name |
Description |
bool? |
typedkeys |
|
Returns
Implements
Extension Methods