This class contains a definition of each query string parameter that can be accepeted by actions in the API.
qs_init() use Elasticsearch::Util::API::QS qw(qs_init);
$handler = qs_init( @qs_params );
$qs_hash = $handler->($params);
The qs_init() sub accepts a list of query string parameter names, and returns a handler which can extract those parameters from \%params and return a hash of values to be passed as a query string.
For instance:
$handler = qs_init(qw(fields size from));
$params = { fields =>['foo','bar'], size => 10, query=>\%query };
$qs_hash = $handler->($params);
Would result in:
$qs_hash: { fields => 'foo,bar', size => 10};
$params: { query => \%query }