Class CountRequest
Request for Count
https://opensearch.org/docs/latest/opensearch/rest-api/count/
Inheritance
Inherited Members
Namespace: OpenSearch.Client
Assembly: OpenSearch.Client.dll
Syntax
public class CountRequest : PlainRequestBase<CountRequestParameters>, ICountRequest, IRequest<CountRequestParameters>, IRequest
Constructors
| Edit this page View SourceCountRequest()
/_count
Declaration
public CountRequest()
CountRequest(Indices)
/{index}/_count
Declaration
public CountRequest(Indices index)
Parameters
Type | Name | Description |
---|---|---|
Indices | index | Optional, accepts null |
Properties
| Edit this page View SourceAllowNoIndices
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 bool? AllowNoIndices { get; set; }
Property Value
Type | Description |
---|---|
bool? |
AnalyzeWildcard
Specify whether wildcard and prefix queries should be analyzed (default: false)
Declaration
public bool? AnalyzeWildcard { get; set; }
Property Value
Type | Description |
---|---|
bool? |
Analyzer
The analyzer to use for the query string
Declaration
public string Analyzer { get; set; }
Property Value
Type | Description |
---|---|
string |
DefaultOperator
The default operator for query string query (AND or OR)
Declaration
public DefaultOperator? DefaultOperator { get; set; }
Property Value
Type | Description |
---|---|
DefaultOperator? |
Df
The field to use as default where no field prefix is given in the query string
Declaration
public string Df { get; set; }
Property Value
Type | Description |
---|---|
string |
ExpandWildcards
Whether to expand wildcard expression to concrete indices that are open, closed or both.
Declaration
public ExpandWildcards? ExpandWildcards { get; set; }
Property Value
Type | Description |
---|---|
ExpandWildcards? |
HttpMethod
Declaration
protected override HttpMethod HttpMethod { get; }
Property Value
Type | Description |
---|---|
HttpMethod |
Overrides
| Edit this page View SourceIgnoreThrottled
Whether specified concrete, expanded or aliased indices should be ignored when throttled
Declaration
public bool? IgnoreThrottled { get; set; }
Property Value
Type | Description |
---|---|
bool? |
IgnoreUnavailable
Whether specified concrete indices should be ignored when unavailable (missing or closed)
Declaration
public bool? IgnoreUnavailable { get; set; }
Property Value
Type | Description |
---|---|
bool? |
Lenient
Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
Declaration
public bool? Lenient { get; set; }
Property Value
Type | Description |
---|---|
bool? |
MinScore
Include only documents with a specific _score
value in the result
Declaration
public double? MinScore { get; set; }
Property Value
Type | Description |
---|---|
double? |
Preference
Specify the node or shard the operation should be performed on (default: random)
Declaration
public string Preference { get; set; }
Property Value
Type | Description |
---|---|
string |
Query
Declaration
public QueryContainer Query { get; set; }
Property Value
Type | Description |
---|---|
QueryContainer |
QueryOnQueryString
Query in the Lucene query string syntax
Declaration
public string QueryOnQueryString { get; set; }
Property Value
Type | Description |
---|---|
string |
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 Routing Routing { get; set; }
Property Value
Type | Description |
---|---|
Routing |
Self
Declaration
protected ICountRequest Self { get; }
Property Value
Type | Description |
---|---|
ICountRequest |
TerminateAfter
The maximum count for each shard, upon reaching which the query execution will terminate early
Declaration
public long? TerminateAfter { get; set; }
Property Value
Type | Description |
---|---|
long? |