NAME

OpenSearch::Cluster::Allocation - OpenSearch Cluster Allocation API

SYNOPSIS

use strict;
use warnings;
use OpenSearch;

my $opensearch = OpenSearch->new(
  user => 'admin',
  pass => 'admin',
  hosts => ['http://localhost:9200'],
  secure => 0,
  allow_insecure => 1,
);

my $cluster = $opensearch->cluster;

my $allocation = $cluster->allocation;

my $response = $allocation->explain;

DESCRIPTION

This is the Module for the OpenSearch Cluster Allocation API.

ATTRIBUTES (optional)

For a detailed description of these attributes, see the OpenSearch documentation. Attrubutes can be chained like:

my $response = $object
  ->attribute_1(1)
  ->attribute_2('string')

include_yes_decisions

include_disk_info

current_node

index

primary

shard

METHODS

explain

returns the results of the query as a hash reference.

my $response = $allocation->explain;

explain_p

returns the results of the query as a promise.

$allocation->explain_p->then(sub {
  my $response = shift;
});

LICENSE

Copyright (C) localh0rst.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

AUTHOR

localh0rst <git@fail.ninja>