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
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
}
})
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 ?