I am using elasticsearch js within my application and have successfully connected and queried data from elastic.
I am now trying to implement the count()
method to return the number of documents in the index. Here is the simple code snippet:
elasticClient.count(/* params: CountParams */)
I replaced params: CountParams
with indexName
but I now receive an illegal argument exception saying that ... [/_count] contains unrecognized parameters ...
I cannot find any documentation anywhere, whether on the api, stack overflow, or on other sites, regarding the count method.
I would greatly appreciate it if anyone could provide a working example or any links.
Thank you!