Namespace: API-Count

API-Count

Methods

(static) countApi(params, options, callback) → {Object|Promise.<never>|*}

The count API gives you quick access to the number of documents that match a query. You can also use it to check the document count of an index, data stream, or cluster.
See Also: OpenSearch - Bulk
Parameters:
Name Type Description
params Object
Properties
Name Type Attributes Default Description
allow_no_indices boolean <optional>
false If false, the request returns an error if any wildcard expression or index alias targets any closed or missing indices.
analyzer string <optional>
The analyzer to use in the query string.
analyze_wildcard boolean <optional>
false Specifies whether to analyze wildcard and prefix queries.
default_operator string <optional>
'OR' Indicates whether the default operator for a string query should be 'AND' or 'OR'.
df string <optional>
The default field in case a field prefix is not provided in the query string.
expand_wildcards string <optional>
open Expands wildcard expressions to concrete indices. Combine multiple values with commas. Supported values are 'all', 'open', 'closed', 'hidden', and 'none'.
ignore_unavailable boolean <optional>
false Specifies whether to include missing or closed indices in the response.
lenient boolean <optional>
false Specifies whether OpenSearch should accept requests if queries have format errors (for example, querying a text field for an integer).
min_score number <optional>
Include only documents with a minimum '_score' value in the result.
routing string <optional>
Value used to route the operation to a specific shard.
preference string <optional>
Specifies which shard or node OpenSearch should perform the count operation on.
terminate_after number <optional>
The maximum number of documents OpenSearch should process before terminating the request.
options Object Options for Transport#request
callback function Callback that handles errors and response
Source:
Returns:
Type
Object | Promise.<never> | *