Search Results for

    Show / Hide Table of Contents

    Class CountDescriptor<TDocument>

    Descriptor for Count

    https://opensearch.org/docs/latest/api-reference/count/

    Inheritance
    object
    RequestBase<CountRequestParameters>
    RequestDescriptorBase<CountDescriptor<TDocument>, CountRequestParameters, ICountRequest<TDocument>>
    CountDescriptor<TDocument>
    Implements
    IDescriptor
    ICountRequest<TDocument>
    ICountRequest
    IRequest<CountRequestParameters>
    IRequest
    Inherited Members
    RequestDescriptorBase<CountDescriptor<TDocument>, CountRequestParameters, ICountRequest<TDocument>>.Self
    RequestDescriptorBase<CountDescriptor<TDocument>, CountRequestParameters, ICountRequest<TDocument>>.Assign<TValue>(TValue, Action<ICountRequest<TDocument>, TValue>)
    RequestDescriptorBase<CountDescriptor<TDocument>, CountRequestParameters, ICountRequest<TDocument>>.Qs(string, object)
    RequestDescriptorBase<CountDescriptor<TDocument>, CountRequestParameters, ICountRequest<TDocument>>.RequestConfiguration(Func<RequestConfigurationDescriptor, IRequestConfiguration>)
    RequestDescriptorBase<CountDescriptor<TDocument>, CountRequestParameters, ICountRequest<TDocument>>.ErrorTrace(bool?)
    RequestDescriptorBase<CountDescriptor<TDocument>, CountRequestParameters, ICountRequest<TDocument>>.FilterPath(params string[])
    RequestDescriptorBase<CountDescriptor<TDocument>, CountRequestParameters, ICountRequest<TDocument>>.FilterPath(IEnumerable<string>)
    RequestDescriptorBase<CountDescriptor<TDocument>, CountRequestParameters, ICountRequest<TDocument>>.Human(bool?)
    RequestDescriptorBase<CountDescriptor<TDocument>, CountRequestParameters, ICountRequest<TDocument>>.Pretty(bool?)
    RequestDescriptorBase<CountDescriptor<TDocument>, CountRequestParameters, ICountRequest<TDocument>>.SourceQueryString(string)
    RequestBase<CountRequestParameters>.RequestState
    RequestBase<CountRequestParameters>.ContentType
    RequestBase<CountRequestParameters>.ResolveUrl(RouteValues, IConnectionSettingsValues)
    RequestBase<CountRequestParameters>.RequestDefaults(CountRequestParameters)
    RequestBase<CountRequestParameters>.Q<TOut>(string)
    RequestBase<CountRequestParameters>.Q(string, object)
    RequestBase<CountRequestParameters>.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 CountDescriptor<TDocument> : RequestDescriptorBase<CountDescriptor<TDocument>, CountRequestParameters, ICountRequest<TDocument>>, IDescriptor, ICountRequest<TDocument>, ICountRequest, IRequest<CountRequestParameters>, IRequest where TDocument : class
    Type Parameters
    Name Description
    TDocument

    Constructors

    | Edit this page View Source

    CountDescriptor()

    /{index}/_count

    Declaration
    public CountDescriptor()
    | Edit this page View Source

    CountDescriptor(Indices)

    /{index}/_count

    Declaration
    public CountDescriptor(Indices index)
    Parameters
    Type Name Description
    Indices index

    Optional, accepts null

    Properties

    | Edit this page View Source

    HttpMethod

    Declaration
    protected override HttpMethod HttpMethod { get; }
    Property Value
    Type Description
    HttpMethod
    Overrides
    RequestBase<CountRequestParameters>.HttpMethod

    Methods

    | Edit this page View Source

    AllIndices()

    A shortcut into calling Index(Indices.All)

    Declaration
    public CountDescriptor<TDocument> AllIndices()
    Returns
    Type Description
    CountDescriptor<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.

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

    AnalyzeWildcard(bool?)

    If true, wildcard and prefix queries are analyzed. This parameter can only be used when the q query string parameter is specified.

    Declaration
    public CountDescriptor<TDocument> AnalyzeWildcard(bool? analyzewildcard = true)
    Parameters
    Type Name Description
    bool? analyzewildcard
    Returns
    Type Description
    CountDescriptor<TDocument>
    | Edit this page View Source

    Analyzer(string)

    Analyzer to use for the query string. This parameter can only be used when the q query string parameter is specified.

    Declaration
    public CountDescriptor<TDocument> Analyzer(string analyzer)
    Parameters
    Type Name Description
    string analyzer
    Returns
    Type Description
    CountDescriptor<TDocument>
    | Edit this page View Source

    DefaultOperator(DefaultOperator?)

    The default operator for query string query: AND or OR. This parameter can only be used when the q query string parameter is specified.

    Declaration
    public CountDescriptor<TDocument> DefaultOperator(DefaultOperator? defaultoperator)
    Parameters
    Type Name Description
    DefaultOperator? defaultoperator
    Returns
    Type Description
    CountDescriptor<TDocument>
    | Edit this page View Source

    Df(string)

    Field to use as default where no field prefix is given in the query string. This parameter can only be used when the q query string parameter is specified.

    Declaration
    public CountDescriptor<TDocument> Df(string df)
    Parameters
    Type Name Description
    string df
    Returns
    Type Description
    CountDescriptor<TDocument>
    | Edit this page View Source

    ExpandWildcards(ExpandWildcards?)

    Specifies the type of index that wildcard expressions can match. Supports comma-separated values.

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

    IgnoreThrottled(bool?)

    If true, concrete, expanded or aliased indexes are ignored when frozen.

    Declaration
    public CountDescriptor<TDocument> IgnoreThrottled(bool? ignorethrottled = true)
    Parameters
    Type Name Description
    bool? ignorethrottled
    Returns
    Type Description
    CountDescriptor<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 CountDescriptor<TDocument> IgnoreUnavailable(bool? ignoreunavailable = true)
    Parameters
    Type Name Description
    bool? ignoreunavailable
    Returns
    Type Description
    CountDescriptor<TDocument>
    | Edit this page View Source

    Index(Indices)

    Comma-separated list of data streams, indexes, and aliases to search. Supports wildcards (*). To search all data streams and indexes, omit this parameter or use * or _all.

    Declaration
    public CountDescriptor<TDocument> Index(Indices index)
    Parameters
    Type Name Description
    Indices index
    Returns
    Type Description
    CountDescriptor<TDocument>
    | Edit this page View Source

    Index<TOther>()

    a shortcut into calling Index(typeof(TOther))

    Declaration
    public CountDescriptor<TDocument> Index<TOther>() where TOther : class
    Returns
    Type Description
    CountDescriptor<TDocument>
    Type Parameters
    Name Description
    TOther
    | Edit this page View Source

    Lenient(bool?)

    If true, format-based query failures (such as providing text to a numeric field) in the query string will be ignored.

    Declaration
    public CountDescriptor<TDocument> Lenient(bool? lenient = true)
    Parameters
    Type Name Description
    bool? lenient
    Returns
    Type Description
    CountDescriptor<TDocument>
    | Edit this page View Source

    MinScore(float?)

    Sets the minimum _score value that documents must have to be included in the result.

    Declaration
    public CountDescriptor<TDocument> MinScore(float? minscore)
    Parameters
    Type Name Description
    float? minscore
    Returns
    Type Description
    CountDescriptor<TDocument>
    | Edit this page View Source

    Preference(string)

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

    Declaration
    public CountDescriptor<TDocument> Preference(string preference)
    Parameters
    Type Name Description
    string preference
    Returns
    Type Description
    CountDescriptor<TDocument>
    | Edit this page View Source

    Query(Func<QueryContainerDescriptor<TDocument>, QueryContainer>)

    Declaration
    public CountDescriptor<TDocument> Query(Func<QueryContainerDescriptor<TDocument>, QueryContainer> querySelector)
    Parameters
    Type Name Description
    Func<QueryContainerDescriptor<TDocument>, QueryContainer> querySelector
    Returns
    Type Description
    CountDescriptor<TDocument>
    | Edit this page View Source

    QueryOnQueryString(string)

    Query in the Lucene query string syntax.

    Declaration
    public CountDescriptor<TDocument> QueryOnQueryString(string queryonquerystring)
    Parameters
    Type Name Description
    string queryonquerystring
    Returns
    Type Description
    CountDescriptor<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 CountDescriptor<TDocument> Routing(Routing routing)
    Parameters
    Type Name Description
    Routing routing
    Returns
    Type Description
    CountDescriptor<TDocument>
    | Edit this page View Source

    TerminateAfter(int?)

    Maximum number of documents to collect for each shard. If a query reaches this limit, OpenSearch terminates the query early. OpenSearch collects documents before sorting.

    Declaration
    public CountDescriptor<TDocument> TerminateAfter(int? terminateafter)
    Parameters
    Type Name Description
    int? terminateafter
    Returns
    Type Description
    CountDescriptor<TDocument>

    Implements

    IDescriptor
    ICountRequest<TDocument>
    ICountRequest
    IRequest<TParameters>
    IRequest

    Extension Methods

    SuffixExtensions.Suffix(object, string)
    • Edit this page
    • View Source
    In this article
    • Constructors
      • CountDescriptor()
      • CountDescriptor(Indices)
    • Properties
      • HttpMethod
    • Methods
      • AllIndices()
      • AllowNoIndices(bool?)
      • AnalyzeWildcard(bool?)
      • Analyzer(string)
      • DefaultOperator(DefaultOperator?)
      • Df(string)
      • ExpandWildcards(ExpandWildcards?)
      • IgnoreThrottled(bool?)
      • IgnoreUnavailable(bool?)
      • Index(Indices)
      • Index<TOther>()
      • Lenient(bool?)
      • MinScore(float?)
      • Preference(string)
      • Query(Func<QueryContainerDescriptor<TDocument>, QueryContainer>)
      • QueryOnQueryString(string)
      • Routing(Routing)
      • TerminateAfter(int?)
    • Implements
    • Extension Methods
    Back to top Generated by DocFX