Elasticsearch::Transport - Interface between the client class the Elasticsearch cluster
version 0.72
The Transport class manages the request cycle. It receives parsed requests from the (user-facing) client class, and tries to execute the request on a node in the cluster, retrying a request if necessary.
Raw requests can be executed using the transport class as follows:
$result = $e->transport->perform_request( method => 'POST', path => '/_search', qs => { from => 0, size => 10 }, body => { query => { match => { title => "Elasticsearch clients" } } } );
Other than the method, path, qs and body parameters, which should be self-explanatory, it also accepts:
method
path
qs
body
ignore
The HTTP error codes which should be ignored instead of throwing an error, eg 404 NOT FOUND:
404 NOT FOUND
$result = $e->transport->perform_request( method => 'GET', path => '/index/type/id' ignore => [404], );
serialize
Whether the body should be serialized in the standard way (as plain JSON) or using the special bulk format: "std" or "bulk".
"std"
"bulk"
Clinton Gormley <drtech@cpan.org>
This software is Copyright (c) 2013 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.