Hello!
Is it possible to pass the search_after
parameter in URL of GET request somehow?
Currently I am using URL like this with body below to paginate big resultset (more than 10000 entries) using search_after
parameter as described in Paginate search results | Elasticsearch Guide [8.14] | Elastic:
/_search?q=target.type:dev&sort=target.raw&_source=target.raw&size=256
{
"search_after": ["Mezhyrich"]
}
This works, but I would like to keep everything in URL avoiding passing body if possible, for example (note the search_after
hypothetical query parameter at the beginning of the URL):
/_search?search_after:[Mezhyrich]&q=target.type:dev&sort=target.raw&_source=target.raw&size=256
which unfortunately does not work returning 400 Bad Request illegal_argument_exception request contains unrecognized parameter error, suggesting that Elasticsearch (7.10.2) does not recognize the search_after
as a correct URL query parameter.
I reviewed Lucene query syntax | Kibana Guide [8.14] | Elastic, and also URI Search | Elasticsearch Guide [7.2] | Elastic but did not find a way to specify search_after
parameter in URL.
Thank you in advance for your help.