I am using Elasticsearch DSL and I would like to view the results. To do this, I need to know the total number of search results. How am I best to do this?
Do I do one search, then do it twice, usually for .hits.total, and the other for elements? Something like that:
response = Link.search().filter("term", run_id=run_id)
total = response.execute().hits.total
links = response[start:end].execute()
source
share