elasticsearchr
elasticsearchr copied to clipboard
Handling more than 10k result
how to get more than 10 k result. Is there scroll function here... thanks
You're gonna have to provide more information than that 😃
I mean, how I can get result more than 10k, since basic elastic search limited to 10k. Here is my query that I am trying to use.
team_name = "A Team Name"
fisrt_date = "2019-01-01"
last_date = "2019-01-31"
el_query <- elasticsearchr::query(
paste0(
'{
"bool": {
"must": [
{
"query_string": {
"default_field": "team",
"query": "',team_name,'"
}
},
{
"match": {
"katakunci": "',keywords,'"
}
},
{
"range": {
"tanggal": {
"gt": "',first_date,'",
"lt": "',last_date,'"
}
}
}
]
}
}'
), size = 20000
)'
records <- elasticsearchr::elastic(cluster_url = url, index = "index_name",
doc_type = "_doc") %search% el_query
That would give me an error, because as far as I know, size parameter limited to only 10000. But I want lets say in my case size = 20000. I know that in elastic there is scroll api that possible to get more than 10K result. My question is in elasticsearchr there are any function to get more than 10k result.
Thankyou Alex.
up for this