# How can i took all Hit values record in python?

**URL:** <https://discuss.elastic.co/t/how-can-i-took-all-hit-values-record-in-python/258273>\
**Category:** Elasticsearch\
**Created:** [December 10, 2020, 12:56pm UTC](https://discuss.elastic.co/t/how-can-i-took-all-hit-values-record-in-python/258273 "2020-12-10T12:56:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![subham\_p](https://avatars.discourse-cdn.com/v4/letter/s/71e660/32.png) [@subham\_p](https://discuss.elastic.co/u/subham_p)\
**Post date:** [December 10, 2020, 12:56pm UTC](https://discuss.elastic.co/t/how-can-i-took-all-hit-values-record-in-python/258273/1 "2020-12-10T12:56:45Z")

</div>

```auto
'took': 14,
 'timed_out': False,
 '_shards': {'total': 1, 'successful': 1, 'skipped': 0, 'failed': 0},
 'hits': {'total': {'value': 99, 'relation': 'eq'},
  'max_score': 1.0,`Preformatted text`

```

when I am trying with this,Every runs it gives random number of output  
response = es.search(index="index", body=search\_param,request\_timeout=100)  
i have also tried with  
"size": 10000

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [December 10, 2020, 3:00pm UTC](https://discuss.elastic.co/t/how-can-i-took-all-hit-values-record-in-python/258273/2 "2020-12-10T15:00:20Z")

</div>

You can use:

- the [`size` and `from` parameters](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-from-size.html) to display by default up to 10000 records to your users. If you want to change this limit, you can change `index.max_result_window` setting but be aware of the consequences (ie memory).
- the [search after](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-search-after.html) feature to do deep pagination.
- the [Scroll API](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-scroll.html) if you want to extract a resultset to be consumed by another tool later.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [January 7, 2021, 3:00pm UTC](https://discuss.elastic.co/t/how-can-i-took-all-hit-values-record-in-python/258273/3 "2021-01-07T15:00:33Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
