Elasticsearch::Util::API::QS - A utility class for query string parameters in the API
version 1.01
This class contains a definition of each query string parameter that can be accepted 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.
\%params
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 }
Clinton Gormley <drtech@cpan.org>
This software is Copyright (c) 2014 by Elasticsearch BV.
This is free software, licensed under:
The Apache License, Version 2.0, January 2004
To install Elasticsearch, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Elasticsearch
CPAN shell
perl -MCPAN -e shell install Elasticsearch
For more information on module installation, please visit the detailed CPAN module installation guide.