In my product
index I have 60K records, I'm running a match query with from, size params. by default, ES support a 10k record search so I have increased it to 60k.
My issue is I'm already passing size param from API & I want to search in 60K records with the same pagination size param.
So how I can match 60k records with my pagination size param.
Here is my code:
const query = {
query: {
match: {
name: {
query: req.text
}
}
}
}
const { body: { hits } } = await esclient.search({
from: req.skip || 0,
size: req.offset || 50,
index: productsIndex,
type: productsType,
body: query,
});
here code with 60K size:
const query = {
query: {
match: {
name: {
query: req.text
}
}
},
size:60000
}
in my query, if I use size=60K, I'm getting 20 records (without that I'm getting 12 records) but I can't use pagination params.