Class SearchShardsDescriptor<TDocument>
Descriptor for SearchShards
https://opensearch.org/docs/latest/security-plugin/access-control/cross-cluster-search/
Inheritance
SearchShardsDescriptor<TDocument>
Assembly: OpenSearch.Client.dll
Syntax
public class SearchShardsDescriptor<TDocument> : RequestDescriptorBase<SearchShardsDescriptor<TDocument>, SearchShardsRequestParameters, ISearchShardsRequest<TDocument>>, IDescriptor, ISearchShardsRequest<TDocument>, ISearchShardsRequest, IRequest<SearchShardsRequestParameters>, IRequest where TDocument : class
Type Parameters
Name |
Description |
TDocument |
|
Constructors
|
Edit this page
View Source
SearchShardsDescriptor()
Declaration
public SearchShardsDescriptor()
|
Edit this page
View Source
SearchShardsDescriptor(Indices)
Declaration
public SearchShardsDescriptor(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 SearchShardsDescriptor<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 SearchShardsDescriptor<TDocument> AllowNoIndices(bool? allownoindices = true)
Parameters
Type |
Name |
Description |
bool? |
allownoindices |
|
Returns
|
Edit this page
View Source
ExpandWildcards(ExpandWildcards?)
Whether to expand wildcard expression to concrete indices that are open, closed or both.
Declaration
public SearchShardsDescriptor<TDocument> ExpandWildcards(ExpandWildcards? expandwildcards)
Parameters
Returns
|
Edit this page
View Source
IgnoreUnavailable(bool?)
Whether specified concrete indices should be ignored when unavailable (missing or closed)
Declaration
public SearchShardsDescriptor<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 SearchShardsDescriptor<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 SearchShardsDescriptor<TDocument> Index<TOther>() where TOther : class
Returns
Type Parameters
|
Edit this page
View Source
Local(bool?)
Return local information, do not retrieve the state from cluster_manager node (default: false)
Declaration
public SearchShardsDescriptor<TDocument> Local(bool? local = true)
Parameters
Type |
Name |
Description |
bool? |
local |
|
Returns
|
Edit this page
View Source
Preference(string)
Specify the node or shard the operation should be performed on (default: random)
Declaration
public SearchShardsDescriptor<TDocument> Preference(string preference)
Parameters
Type |
Name |
Description |
string |
preference |
|
Returns
|
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 SearchShardsDescriptor<TDocument> Routing(Routing routing)
Parameters
Type |
Name |
Description |
Routing |
routing |
|
Returns
Implements
Extension Methods