Search Results for

    Show / Hide Table of Contents

    Class SearchShardsDescriptor<TDocument>

    A descriptor which describes a search operation for _search_shards

    Inheritance
    object
    RequestBase<SearchShardsRequestParameters>
    RequestDescriptorBase<SearchShardsDescriptor<TDocument>, SearchShardsRequestParameters, ISearchShardsRequest<TDocument>>
    SearchShardsDescriptor<TDocument>
    Implements
    IDescriptor
    ISearchShardsRequest<TDocument>
    ISearchShardsRequest
    IRequest<SearchShardsRequestParameters>
    IRequest
    Inherited Members
    RequestDescriptorBase<SearchShardsDescriptor<TDocument>, SearchShardsRequestParameters, ISearchShardsRequest<TDocument>>.Self
    RequestDescriptorBase<SearchShardsDescriptor<TDocument>, SearchShardsRequestParameters, ISearchShardsRequest<TDocument>>.Assign<TValue>(TValue, Action<ISearchShardsRequest<TDocument>, TValue>)
    RequestDescriptorBase<SearchShardsDescriptor<TDocument>, SearchShardsRequestParameters, ISearchShardsRequest<TDocument>>.Qs(string, object)
    RequestDescriptorBase<SearchShardsDescriptor<TDocument>, SearchShardsRequestParameters, ISearchShardsRequest<TDocument>>.RequestConfiguration(Func<RequestConfigurationDescriptor, IRequestConfiguration>)
    RequestDescriptorBase<SearchShardsDescriptor<TDocument>, SearchShardsRequestParameters, ISearchShardsRequest<TDocument>>.ErrorTrace(bool?)
    RequestDescriptorBase<SearchShardsDescriptor<TDocument>, SearchShardsRequestParameters, ISearchShardsRequest<TDocument>>.FilterPath(params string[])
    RequestDescriptorBase<SearchShardsDescriptor<TDocument>, SearchShardsRequestParameters, ISearchShardsRequest<TDocument>>.FilterPath(IEnumerable<string>)
    RequestDescriptorBase<SearchShardsDescriptor<TDocument>, SearchShardsRequestParameters, ISearchShardsRequest<TDocument>>.Human(bool?)
    RequestDescriptorBase<SearchShardsDescriptor<TDocument>, SearchShardsRequestParameters, ISearchShardsRequest<TDocument>>.Pretty(bool?)
    RequestDescriptorBase<SearchShardsDescriptor<TDocument>, SearchShardsRequestParameters, ISearchShardsRequest<TDocument>>.SourceQueryString(string)
    RequestBase<SearchShardsRequestParameters>.HttpMethod
    RequestBase<SearchShardsRequestParameters>.RequestState
    RequestBase<SearchShardsRequestParameters>.ContentType
    RequestBase<SearchShardsRequestParameters>.ResolveUrl(RouteValues, IConnectionSettingsValues)
    RequestBase<SearchShardsRequestParameters>.RequestDefaults(SearchShardsRequestParameters)
    RequestBase<SearchShardsRequestParameters>.Q<TOut>(string)
    RequestBase<SearchShardsRequestParameters>.Q(string, object)
    RequestBase<SearchShardsRequestParameters>.SetAcceptHeader(string)
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: OpenSearch.Client
    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()

    /{index}/_search_shards

    Declaration
    public SearchShardsDescriptor()
    | Edit this page View Source

    SearchShardsDescriptor(Indices)

    /{index}/_search_shards

    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
    Type Description
    SearchShardsDescriptor<TDocument>
    | Edit this page View Source

    AllowNoIndices(bool?)

    If false, the request returns an error if any wildcard expression, index alias, or _all value targets only missing or closed indexes. This behavior applies even if the request targets other open indexes. For example, a request targeting foo*,bar* returns an error if an index starts with foo but no index starts with bar.

    Declaration
    public SearchShardsDescriptor<TDocument> AllowNoIndices(bool? allownoindices = true)
    Parameters
    Type Name Description
    bool? allownoindices
    Returns
    Type Description
    SearchShardsDescriptor<TDocument>
    | Edit this page View Source

    ExpandWildcards(ExpandWildcards?)

    Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as open,hidden. Valid values are: all, open, closed, hidden, none.

    Declaration
    public SearchShardsDescriptor<TDocument> ExpandWildcards(ExpandWildcards? expandwildcards)
    Parameters
    Type Name Description
    ExpandWildcards? expandwildcards
    Returns
    Type Description
    SearchShardsDescriptor<TDocument>
    | Edit this page View Source

    IgnoreUnavailable(bool?)

    If false, the request returns an error if it targets a missing or closed index.

    Declaration
    public SearchShardsDescriptor<TDocument> IgnoreUnavailable(bool? ignoreunavailable = true)
    Parameters
    Type Name Description
    bool? ignoreunavailable
    Returns
    Type Description
    SearchShardsDescriptor<TDocument>
    | Edit this page View Source

    Index(Indices)

    Returns the indexes and shards that a search request would be executed against.

    Declaration
    public SearchShardsDescriptor<TDocument> Index(Indices index)
    Parameters
    Type Name Description
    Indices index
    Returns
    Type Description
    SearchShardsDescriptor<TDocument>
    | 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 Description
    SearchShardsDescriptor<TDocument>
    Type Parameters
    Name Description
    TOther
    | Edit this page View Source

    Local(bool?)

    If true, the request retrieves information from the local node only.

    Declaration
    public SearchShardsDescriptor<TDocument> Local(bool? local = true)
    Parameters
    Type Name Description
    bool? local
    Returns
    Type Description
    SearchShardsDescriptor<TDocument>
    | Edit this page View Source

    Preference(string)

    Specifies the node or shard the operation should be performed on. Random by default.

    Declaration
    public SearchShardsDescriptor<TDocument> Preference(string preference)
    Parameters
    Type Name Description
    string preference
    Returns
    Type Description
    SearchShardsDescriptor<TDocument>
    | 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 OpenSearch.Client 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
    Type Description
    SearchShardsDescriptor<TDocument>

    Implements

    IDescriptor
    ISearchShardsRequest<TDocument>
    ISearchShardsRequest
    IRequest<TParameters>
    IRequest

    Extension Methods

    SuffixExtensions.Suffix(object, string)
    • Edit this page
    • View Source
    In this article
    • Constructors
      • SearchShardsDescriptor()
      • SearchShardsDescriptor(Indices)
    • Methods
      • AllIndices()
      • AllowNoIndices(bool?)
      • ExpandWildcards(ExpandWildcards?)
      • IgnoreUnavailable(bool?)
      • Index(Indices)
      • Index<TOther>()
      • Local(bool?)
      • Preference(string)
      • Routing(Routing)
    • Implements
    • Extension Methods
    Back to top Generated by DocFX