Class CountDescriptor<TDocument>
Descriptor for Count
https://opensearch.org/docs/latest/opensearch/rest-api/count/
Inheritance
CountDescriptor<TDocument>
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()
Declaration
|
Edit this page
View Source
CountDescriptor(Indices)
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
Overrides
Methods
|
Edit this page
View Source
AllIndices()
A shortcut into calling Index(Indices.All)
Declaration
public CountDescriptor<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 CountDescriptor<TDocument> AllowNoIndices(bool? allownoindices = true)
Parameters
Type |
Name |
Description |
bool? |
allownoindices |
|
Returns
|
Edit this page
View Source
AnalyzeWildcard(bool?)
Specify whether wildcard and prefix queries should be analyzed (default: false)
Declaration
public CountDescriptor<TDocument> AnalyzeWildcard(bool? analyzewildcard = true)
Parameters
Type |
Name |
Description |
bool? |
analyzewildcard |
|
Returns
|
Edit this page
View Source
Analyzer(string)
The analyzer to use for the query string
Declaration
public CountDescriptor<TDocument> Analyzer(string analyzer)
Parameters
Type |
Name |
Description |
string |
analyzer |
|
Returns
|
Edit this page
View Source
DefaultOperator(DefaultOperator?)
The default operator for query string query (AND or OR)
Declaration
public CountDescriptor<TDocument> DefaultOperator(DefaultOperator? defaultoperator)
Parameters
Returns
|
Edit this page
View Source
Df(string)
The field to use as default where no field prefix is given in the query string
Declaration
public CountDescriptor<TDocument> Df(string df)
Parameters
Type |
Name |
Description |
string |
df |
|
Returns
|
Edit this page
View Source
ExpandWildcards(ExpandWildcards?)
Whether to expand wildcard expression to concrete indices that are open, closed or both.
Declaration
public CountDescriptor<TDocument> ExpandWildcards(ExpandWildcards? expandwildcards)
Parameters
Returns
|
Edit this page
View Source
IgnoreThrottled(bool?)
Whether specified concrete, expanded or aliased indices should be ignored when throttled
Declaration
public CountDescriptor<TDocument> IgnoreThrottled(bool? ignorethrottled = true)
Parameters
Type |
Name |
Description |
bool? |
ignorethrottled |
|
Returns
|
Edit this page
View Source
IgnoreUnavailable(bool?)
Whether specified concrete indices should be ignored when unavailable (missing or closed)
Declaration
public CountDescriptor<TDocument> IgnoreUnavailable(bool? ignoreunavailable = true)
Parameters
Type |
Name |
Description |
bool? |
ignoreunavailable |
|
Returns
|
Edit this page
View Source
Index(Indices)
A comma-separated list of indices to restrict the results
Declaration
public CountDescriptor<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 CountDescriptor<TDocument> Index<TOther>() where TOther : class
Returns
Type Parameters
|
Edit this page
View Source
Lenient(bool?)
Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
Declaration
public CountDescriptor<TDocument> Lenient(bool? lenient = true)
Parameters
Type |
Name |
Description |
bool? |
lenient |
|
Returns
|
Edit this page
View Source
MinScore(double?)
Include only documents with a specific _score
value in the result
Declaration
public CountDescriptor<TDocument> MinScore(double? minscore)
Parameters
Type |
Name |
Description |
double? |
minscore |
|
Returns
|
Edit this page
View Source
Preference(string)
Specify the node or shard the operation should be performed on (default: random)
Declaration
public CountDescriptor<TDocument> Preference(string preference)
Parameters
Type |
Name |
Description |
string |
preference |
|
Returns
|
Edit this page
View Source
Query(Func<QueryContainerDescriptor<TDocument>, QueryContainer>)
Declaration
public CountDescriptor<TDocument> Query(Func<QueryContainerDescriptor<TDocument>, QueryContainer> querySelector)
Parameters
Returns
|
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
|
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
|
Edit this page
View Source
TerminateAfter(long?)
The maximum count for each shard, upon reaching which the query execution will terminate early
Declaration
public CountDescriptor<TDocument> TerminateAfter(long? terminateafter)
Parameters
Type |
Name |
Description |
long? |
terminateafter |
|
Returns
Implements
Extension Methods