Search Results for

    Show / Hide Table of Contents

    Class CountRequest

    Request for Count

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

    Inheritance
    object
    RequestBase<CountRequestParameters>
    PlainRequestBase<CountRequestParameters>
    CountRequest
    CountRequest<TDocument>
    Implements
    ICountRequest
    IRequest<CountRequestParameters>
    IRequest
    Inherited Members
    PlainRequestBase<CountRequestParameters>.RequestConfiguration
    PlainRequestBase<CountRequestParameters>.ErrorTrace
    PlainRequestBase<CountRequestParameters>.FilterPath
    PlainRequestBase<CountRequestParameters>.Human
    PlainRequestBase<CountRequestParameters>.Pretty
    PlainRequestBase<CountRequestParameters>.SourceQueryString
    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 CountRequest : PlainRequestBase<CountRequestParameters>, ICountRequest, IRequest<CountRequestParameters>, IRequest

    Constructors

    | Edit this page View Source

    CountRequest()

    /_count

    Declaration
    public CountRequest()
    | Edit this page View Source

    CountRequest(Indices)

    /{index}/_count

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

    Optional, accepts null

    Properties

    | Edit this page View Source

    AllowNoIndices

    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 bool? AllowNoIndices { get; set; }
    Property Value
    Type Description
    bool?
    | Edit this page View Source

    AnalyzeWildcard

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

    Declaration
    public bool? AnalyzeWildcard { get; set; }
    Property Value
    Type Description
    bool?
    | Edit this page View Source

    Analyzer

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

    Declaration
    public string Analyzer { get; set; }
    Property Value
    Type Description
    string
    | Edit this page View Source

    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 DefaultOperator? DefaultOperator { get; set; }
    Property Value
    Type Description
    DefaultOperator?
    | Edit this page View Source

    Df

    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 string Df { get; set; }
    Property Value
    Type Description
    string
    | Edit this page View Source

    ExpandWildcards

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

    Declaration
    public ExpandWildcards? ExpandWildcards { get; set; }
    Property Value
    Type Description
    ExpandWildcards?
    | Edit this page View Source

    HttpMethod

    Declaration
    protected override HttpMethod HttpMethod { get; }
    Property Value
    Type Description
    HttpMethod
    Overrides
    RequestBase<CountRequestParameters>.HttpMethod
    | Edit this page View Source

    IgnoreThrottled

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

    Declaration
    public bool? IgnoreThrottled { get; set; }
    Property Value
    Type Description
    bool?
    | Edit this page View Source

    IgnoreUnavailable

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

    Declaration
    public bool? IgnoreUnavailable { get; set; }
    Property Value
    Type Description
    bool?
    | Edit this page View Source

    Lenient

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

    Declaration
    public bool? Lenient { get; set; }
    Property Value
    Type Description
    bool?
    | Edit this page View Source

    MinScore

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

    Declaration
    public float? MinScore { get; set; }
    Property Value
    Type Description
    float?
    | Edit this page View Source

    Preference

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

    Declaration
    public string Preference { get; set; }
    Property Value
    Type Description
    string
    | Edit this page View Source

    Query

    Declaration
    public QueryContainer Query { get; set; }
    Property Value
    Type Description
    QueryContainer
    | Edit this page View Source

    QueryOnQueryString

    Query in the Lucene query string syntax.

    Declaration
    public string QueryOnQueryString { get; set; }
    Property Value
    Type Description
    string
    | Edit this page View Source

    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 Routing Routing { get; set; }
    Property Value
    Type Description
    Routing
    | Edit this page View Source

    Self

    Declaration
    protected ICountRequest Self { get; }
    Property Value
    Type Description
    ICountRequest
    | Edit this page View Source

    TerminateAfter

    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 int? TerminateAfter { get; set; }
    Property Value
    Type Description
    int?

    Implements

    ICountRequest
    IRequest<TParameters>
    IRequest

    Extension Methods

    SuffixExtensions.Suffix(object, string)
    • Edit this page
    • View Source
    In this article
    • Constructors
      • CountRequest()
      • CountRequest(Indices)
    • Properties
      • AllowNoIndices
      • AnalyzeWildcard
      • Analyzer
      • DefaultOperator
      • Df
      • ExpandWildcards
      • HttpMethod
      • IgnoreThrottled
      • IgnoreUnavailable
      • Lenient
      • MinScore
      • Preference
      • Query
      • QueryOnQueryString
      • Routing
      • Self
      • TerminateAfter
    • Implements
    • Extension Methods
    Back to top Generated by DocFX