ropensci / elastic

R client for the Elasticsearch HTTP API
https://docs.ropensci.org/elastic
Other
245 stars 58 forks source link

track_total_hits in request for elastic >= 7.0 #262

Closed orenov closed 4 years ago

orenov commented 4 years ago

Adding track_total_hits param in a request. As it's the only way how to get exact counts using the Search function. https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-track-total-hits.html

Unfortunately, I didn't test it much, but I hope it's ok as it's simple.

I had an assumption that this parameter was introduced with elasticsearch 7.0.