Elastijk

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

    using HTTP client, and an object-oriented sugar layer to make it a
    little bit easier to use. The following documentation describe the
    low-level function first.

FUNCTIONS

 Elastijk::request( $args :HashRef ) : ($status :Int, $response :HashRef)

    Making a request to the Elasticsearch server specified in $args. It
    returns 2 values. $status is the HTTP status code of the response, and
    the $response decoded as HashRef. Elasticsearch API always respond a
    single HashRef as JSON text, this might or might not be changed in the
    future, if it is changed then this function will be adjusted
    accordingly.

    The $args is a HashRef takes contains the following key-value pairs:

        host  => Str
        port  => Str
        index => Str
        type  => Str

README  view on Meta::CPAN


    For all cases, Elastijk simply bypass the value it receive to the
    server without doing any parameter validation. If that generates some
    errors, it'll be on server side.

 Elastijk::request_raw( $args :HashRef ) : ($status :Int, $response :Str)

    Making a request to the Elasticsearch server specified in $args. The
    main difference between this function and Elastijk::request is that
    $args-{body}> s expected to be a String scalar, rather then a HashRef.
    And the $response is not decoded from JSON. This function can be used
    if users wish to use their own JSON parser to parse response, or if
    they wish to delay the parsing to be done latter in some
    bulk-processing pipeline.

OBJECT

 PROPERTIES

    An Elastijk object is constructed like this:

README.md  view on Meta::CPAN

Elastijk provided low-level functions that are almost identical as using HTTP
client, and an object-oriented sugar layer to make it a little bit easier to
use. The following documentation describe the low-level function first.

# FUNCTIONS

## Elastijk::request( $args :HashRef ) : ($status :Int, $response :HashRef)

Making a request to the Elasticsearch server specified in `$args`. It returns 2
values. `$status` is the HTTP status code of the response, and the `$response`
decoded as HashRef. Elasticsearch API always respond a single HashRef as JSON
text, this might or might not be changed in the future, if it is changed then
this function will be adjusted accordingly.

The `$args` is a HashRef takes contains the following key-value pairs:

    host  => Str
    port  => Str
    index => Str
    type  => Str
    id    => Str

README.md  view on Meta::CPAN


For all cases, Elastijk simply bypass the value it receive to the server without
doing any parameter validation. If that generates some errors, it'll be on
server side.

## Elastijk::request\_raw( $args :HashRef ) : ($status :Int, $response :Str)

Making a request to the Elasticsearch server specified in `$args`. The main
difference between this function and `Elastijk::request` is that
`$args-`{body}> s expected to be a String scalar, rather then a HashRef. And
the $response is not decoded from JSON. This function can be used if users wish
to use their own JSON parser to parse response, or if they wish to delay the
parsing to be done latter in some bulk-processing pipeline.

# OBJECT

## PROPERTIES

An Elastijk object is constructed like this:

    my $es = Elastijk->new(

lib/Elastijk.pm  view on Meta::CPAN

Elastijk provided low-level functions that are almost identical as using HTTP
client, and an object-oriented sugar layer to make it a little bit easier to
use. The following documentation describe the low-level function first.

=head1 FUNCTIONS

=head2 Elastijk::request( $args :HashRef ) : ($status :Int, $response :HashRef)

Making a request to the Elasticsearch server specified in C<$args>. It returns 2
values. C<$status> is the HTTP status code of the response, and the C<$response>
decoded as HashRef. Elasticsearch API always respond a single HashRef as JSON
text, this might or might not be changed in the future, if it is changed then
this function will be adjusted accordingly.

The C<$args> is a HashRef takes contains the following key-value pairs:

    host  => Str
    port  => Str
    index => Str
    type  => Str
    id    => Str

lib/Elastijk.pm  view on Meta::CPAN


For all cases, Elastijk simply bypass the value it receive to the server without
doing any parameter validation. If that generates some errors, it'll be on
server side.

=head2 Elastijk::request_raw( $args :HashRef ) : ($status :Int, $response :Str)

Making a request to the Elasticsearch server specified in C<$args>. The main
difference between this function and C<Elastijk::request> is that
C<$args->{body}> s expected to be a String scalar, rather then a HashRef. And
the $response is not decoded from JSON. This function can be used if users wish
to use their own JSON parser to parse response, or if they wish to delay the
parsing to be done latter in some bulk-processing pipeline.

=head1 OBJECT

=head2 PROPERTIES

An Elastijk object is constructed like this:

    my $es = Elastijk->new(



( run in 0.245 second using v1.01-cache-2.11-cpan-26ccb49234f )