ializer::JSON> (default)
=item * L<Search::Elasticsearch::Serializer::JSON::Cpanel>
=item * L<Search::Elasticsearch::Serializer::JSON::XS>
=item * L<Search::Elasticsearch::Serializer::JSON::PP>
=b
@actions = @_;
my $weak_add;
my $add = sub {
while (@actions) {
my @json = try {
$self->_encode_action( splice( @actions, 0, 2 ) );
}
};
return unless @json;
push @$buffer, @json;
my $size = $self->_buffer_size;
$size += length($_) + 1 for @json;
$self->_buffer_size(
s a queue, buffering up actions
until it reaches a maximum count of actions, or a maximum size of JSON request
body, at which point it issues a C<bulk()> request.
Once you have finished adding action
e method is changed to C<POST> when a body is present.
=item * C<source>
The body is encoded as JSON and added to the query string as the C<source>
parameter. This has the advantage of still being
);
=item C<serialize>
Whether the C<body> should be serialized in the standard way (as plain
JSON) or using the special I<bulk> format: C<"std"> or C<"bulk">.
=back
=head1 AUTHOR
Enrico Zimue
,
# optional
data => $body_as_string,
mime_type => 'application/json',
timeout => $timeout
})
->then(sub { my ($status,body) = @_; ...})
Sends th
@actions = @_;
my $weak_add;
my $add = sub {
while (@actions) {
my @json = try {
$self->_encode_action( splice( @actions, 0, 2 ) );
}
};
return unless @json;
push @$buffer, @json;
my $size = $self->_buffer_size;
$size += length($_) + 1 for @json;
$self->_buffer_size(
s a queue, buffering up actions
until it reaches a maximum count of actions, or a maximum size of JSON request
body, at which point it issues a C<bulk()> request.
Once you have finished adding action
@actions = @_;
my $weak_add;
my $add = sub {
while (@actions) {
my @json = try {
$self->_encode_action( splice( @actions, 0, 2 ) );
}
};
return unless @json;
push @$buffer, @json;
my $size = $self->_buffer_size;
$size += length($_) + 1 for @json;
$self->_buffer_size(
s a queue, buffering up actions
until it reaches a maximum count of actions, or a maximum size of JSON request
body, at which point it issues a C<bulk()> request.
Once you have finished adding action
,
# optional
data => $body_as_string,
mime_type => 'application/json',
timeout => $timeout
})
->then(sub { my ($status,body) = @_; ...})
Sends th