# Need to increase the return count from 10K for some benchmark testing

**URL:** <https://discuss.elastic.co/t/need-to-increase-the-return-count-from-10k-for-some-benchmark-testing/358127>\
**Category:** Elasticsearch\
**Created:** [April 24, 2024, 1:09pm UTC](https://discuss.elastic.co/t/need-to-increase-the-return-count-from-10k-for-some-benchmark-testing/358127 "2024-04-24T13:09:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![BOYO](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/boyo/32/124388_2.png) [@BOYO](https://discuss.elastic.co/u/BOYO)\
**Post date:** [April 24, 2024, 1:09pm UTC](https://discuss.elastic.co/t/need-to-increase-the-return-count-from-10k-for-some-benchmark-testing/358127/1 "2024-04-24T13:09:20Z")

</div>

As part of an internal POC we're trying to benchmark various queries from the JS client.

We need to increase the return count for an individual query over 10k for one test. Tried scroll api since as per the docs it can be used to return more than 10K records in a single query.

The api call from kibana is successful in returning \>10K entries  
GET /elastic/\_search?scroll=1m

But the same tried from the JS client fails to exceed 10K.  
Increasing the size beyond 10K `size : 10001` also causes it to return 0 entries.

The client code is as follows

```auto
const client = new Client({
    node: process.env.ELASTIC_NODE,
    auth: {
        username: process.env.ELASTIC_U,
        password: process.env.ELASTIC_P
    },
    requestTimeout: 300000,
    tls: {
        rejectUnauthorized: false
    }
})

```

```auto
            config = {
                index: process.env.INDEX,
                scroll: '5m',
                size : 10001,
                query: {
                    bool: {
                        must: queries[qindex++]
                    },
                }}
            data = await client.search(config)

```

Am I doing something wrong here ?

---

<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:** [April 24, 2024, 1:48pm UTC](https://discuss.elastic.co/t/need-to-increase-the-return-count-from-10k-for-some-benchmark-testing/358127/2 "2024-04-24T13:48:18Z")

</div>

Welcome.

No more than 10000 hits per request.  
The scroll API will provide you a scroll id you can use to fetch the next 10000 hits.
