Branch Coverage

blib/lib/Metabrik/Client/Elasticsearch.pm
Criterion Covered Total %
branch 0 1206 0.0


line true false branch
206 0 0 if ($Search::Elasticsearch::VERSION < 5)
220 0 0 unless $self->brik_help_run_undef_arg('open', $nodes)
221 0 0 unless $self->brik_help_run_undef_arg('open', $cxn_pool)
222 0 0 unless $self->brik_help_run_invalid_arg('open', $nodes, 'ARRAY')
223 0 0 unless $self->brik_help_run_empty_array_arg('open', $nodes)
226 0 0 unless ($node =~ m[https?://])
256 0 0 unless (defined $es)
275 0 0 unless $self->brik_help_run_undef_arg('open', $es)
276 0 0 unless $self->brik_help_run_undef_arg('open_bulk_mode', $index)
277 0 0 unless $self->brik_help_run_undef_arg('open_bulk_mode', $type)
291 0 0 if ($self->use_type)
295 0 0 if ($self->use_bulk_autoflush) { }
322 0 0 if ($@)
336 0 0 unless my $version = $self->version
337 0 0 if ($version ge '5.0.0')
345 0 0 unless $self->brik_help_run_undef_arg('open', $es)
346 0 0 unless $self->brik_help_run_undef_arg('open_scroll_scan_mode', $index)
347 0 0 unless $self->brik_help_run_undef_arg('open_scroll_scan_mode', $size)
357 0 0 if ($@)
374 0 0 unless my $version = $self->version
375 0 0 if ($version lt '5.0.0')
385 0 0 unless $self->brik_help_run_undef_arg('open', $es)
386 0 0 unless $self->brik_help_run_undef_arg('open_scroll', $index)
387 0 0 unless $self->brik_help_run_undef_arg('open_scroll', $size)
399 0 0 if ($self->use_type)
400 0 0 if ($type ne '*')
412 0 0 if ($@)
431 0 0 unless (defined $scroll)
445 0 0 unless $self->brik_help_run_undef_arg('open_scroll', $scroll)
451 0 0 if ($@)
466 0 0 unless $self->brik_help_run_undef_arg('open_scroll', $scroll)
470 0 0 if ($count > 1) { }
472 0 0 if (@docs > 0)
480 0 0 if ($@)
498 0 0 unless $self->brik_help_run_undef_arg('open', $es)
499 0 0 unless $self->brik_help_run_undef_arg('index_document', $doc)
500 0 0 unless $self->brik_help_run_invalid_arg('index_document', $doc, 'HASH')
501 0 0 unless $self->brik_help_set_undef_arg('index', $index)
502 0 0 unless $self->brik_help_set_undef_arg('type', $type)
508 0 0 if (defined $id)
512 0 0 if ($self->use_type)
516 0 0 if (defined $hash)
517 0 0 unless $self->brik_help_run_invalid_arg('index_document', $hash, 'HASH')
520 0 0 if (defined $hash->{'routing'} and defined $$doc{$hash->{'routing'}})
530 0 0 if ($@)
547 0 0 unless $self->brik_help_run_undef_arg('open', $es)
548 0 0 unless $self->brik_help_run_undef_arg('reindex', $index)
549 0 0 unless $self->brik_help_run_undef_arg('reindex', $new)
561 0 0 if ($self->use_type)
562 0 0 if (defined $type)
571 0 0 if ($@)
596 0 0 unless $self->brik_help_run_undef_arg('open', $es)
602 0 0 unless (defined $nodes)
612 0 0 if ($action eq 'indices:data/write/reindex' and not exists $tasks{$task})
627 0 0 unless $self->brik_help_run_undef_arg('open', $es)
628 0 0 unless $self->brik_help_run_undef_arg('cancel_reindex_task', $id)
640 0 0 unless $self->brik_help_run_undef_arg('open', $es)
641 0 0 unless $self->brik_help_run_undef_arg('get_taskid', $id)
652 0 0 unless $self->brik_help_run_undef_arg('open', $es)
654 0 0 unless my $tasks = $self->get_reindex_tasks
655 0 0 unless (keys %$tasks)
661 0 0 unless my $task = $self->get_taskid($id)
685 0 0 unless $self->brik_help_run_undef_arg('open', $es)
688 0 0 unless $self->show_reindex_progress
700 0 0 unless $self->brik_help_run_undef_arg('open', $es)
701 0 0 unless $self->brik_help_run_undef_arg('reindex_with_mapping_from_json_file', $index)
703 0 0 unless $self->brik_help_run_undef_arg('reindex_with_mapping_from_json_file', $new)
704 0 0 unless $self->brik_help_run_undef_arg('reindex_with_mapping_from_json_file', $file)
705 0 0 unless $self->brik_help_run_file_not_found('reindex_with_mapping_from_json_file', $file)
708 0 0 unless my $fj = 'Metabrik::File::Json'->new_from_brik_init($self)
709 0 0 unless my $json = $fj->read($file)
728 0 0 unless $self->brik_help_run_undef_arg('open', $es)
729 0 0 unless $self->brik_help_run_undef_arg('update_document', $doc)
730 0 0 unless $self->brik_help_run_invalid_arg('update_document', $doc, 'HASH')
731 0 0 unless $self->brik_help_run_undef_arg('update_document', $id)
732 0 0 unless $self->brik_help_set_undef_arg('index', $index)
733 0 0 unless $self->brik_help_set_undef_arg('type', $type)
741 0 0 if ($self->use_type)
745 0 0 if (defined $hash)
746 0 0 unless $self->brik_help_run_invalid_arg('update_document', $hash, 'HASH')
755 0 0 if ($@)
773 0 0 unless $self->brik_help_run_undef_arg('open_bulk_mode', $bulk)
774 0 0 unless $self->brik_help_run_undef_arg('index_bulk', $doc)
775 0 0 unless $self->brik_help_set_undef_arg('index', $index)
776 0 0 unless $self->brik_help_set_undef_arg('type', $type)
781 0 0 if (defined $id)
785 0 0 if (defined $hash)
786 0 0 unless $self->brik_help_run_invalid_arg('index_bulk', $hash, 'HASH')
788 0 0 if (defined $hash->{'routing'} and defined $$doc{$hash->{'routing'}})
798 0 0 if ($@)
801 0 0 if (defined $p and exists $p->{'class'}) { }
827 0 0 unless $self->brik_help_run_undef_arg('open_bulk_mode', $bulk)
828 0 0 unless $self->brik_help_run_undef_arg('index_bulk_from_list', $list)
829 0 0 unless $self->brik_help_run_invalid_arg('index_bulk_from_list', $list, 'ARRAY')
831 0 0 unless $self->brik_help_run_empty_array_arg('index_bulk_from_list', $list)
833 0 0 unless $self->brik_help_set_undef_arg('index', $index)
834 0 0 unless $self->brik_help_set_undef_arg('type', $type)
836 0 0 if (defined $hash)
837 0 0 unless $self->brik_help_run_invalid_arg('index_bulk_from_list', $hash, 'HASH')
846 0 0 if (defined $hash)
848 0 0 if (defined $hash->{'routing'} and defined $$doc{$hash->{'routing'}})
860 0 0 if ($@)
863 0 0 if (defined $p and exists $p->{'class'}) { }
885 0 0 unless $self->brik_help_run_undef_arg('clean_deleted_from_index', $index)
888 0 0 unless $self->brik_help_run_undef_arg('open', $es)
899 0 0 if ($@)
902 0 0 if (defined $p and exists $p->{'class'}) { }
930 0 0 unless $self->brik_help_run_undef_arg('open_bulk_mode', $bulk)
931 0 0 unless $self->brik_help_run_undef_arg('update_document_bulk', $doc)
932 0 0 unless $self->brik_help_set_undef_arg('index', $index)
933 0 0 unless $self->brik_help_set_undef_arg('type', $type)
940 0 0 if ($self->use_type)
944 0 0 if (defined $id)
948 0 0 if (defined $hash)
949 0 0 unless $self->brik_help_run_invalid_arg('update_document_bulk', $hash, 'HASH')
958 0 0 if ($@)
961 0 0 if (defined $p and exists $p->{'class'}) { }
986 0 0 unless $self->brik_help_run_undef_arg('open_bulk_mode', $bulk)
996 0 0 if ($@)
998 0 0 if (--$try == 0)
1000 0 0 if (defined $p and exists $p->{'class'}) { }
1017 0 0 if (defined $index)
1035 0 0 unless $self->brik_help_run_undef_arg('open', $es)
1038 0 0 if (defined $index and $index ne '*')
1041 0 0 if ($self->use_type)
1042 0 0 if (defined $type and $type ne '*')
1054 0 0 unless my $version = $self->version
1055 0 0 if ($version ge '5.0.0') { }
1071 0 0 if ($self->use_type)
1077 0 0 if ($@)
1082 0 0 if ($version ge '5.0.0') { }
0 0 elsif (exists $r->{'hits'} and exists $r->{'hits'}{'total'}) { }
1083 0 0 if (exists $r->{'count'})
1111 0 0 unless $self->brik_help_run_undef_arg('open', $es)
1112 0 0 unless $self->brik_help_run_undef_arg('query', $query)
1113 0 0 unless $self->brik_help_set_undef_arg('index', $index)
1114 0 0 unless $self->brik_help_set_undef_arg('type', $type)
1115 0 0 unless $self->brik_help_run_invalid_arg('query', $query, 'HASH')
1124 0 0 if (defined $hash)
1125 0 0 unless $self->brik_help_run_invalid_arg('query', $hash, 'HASH')
1129 0 0 if ($self->use_type)
1130 0 0 if ($type ne '*')
1139 0 0 if ($@)
1154 0 0 unless $self->brik_help_run_undef_arg('open', $es)
1155 0 0 unless $self->brik_help_run_undef_arg('get_from_id', $id)
1156 0 0 unless $self->brik_help_set_undef_arg('index', $index)
1157 0 0 unless $self->brik_help_set_undef_arg('type', $type)
1165 0 0 if ($self->use_type)
1170 0 0 if ($@)
1187 0 0 unless $self->brik_help_run_undef_arg('www_search', $query)
1188 0 0 unless $self->brik_help_set_undef_arg('index', $index)
1189 0 0 unless $self->brik_help_set_undef_arg('type', $type)
1194 0 0 unless my $sj = 'Metabrik::String::Json'->new_from_brik_init($self)
1200 0 0 if ($self->use_type)
1201 0 0 if ($type ne '*')
1207 0 0 unless my $get = $self->SUPER::get($url)
1210 0 0 unless my $decoded = $sj->decode($body)
1226 0 0 unless $self->brik_help_run_undef_arg('open', $es)
1227 0 0 unless $self->brik_help_run_undef_arg('delete_index', $index)
1228 0 0 unless $self->brik_help_run_invalid_arg('delete_index', $index, 'ARRAY', 'SCALAR')
1238 0 0 if ($@)
1258 0 0 unless $self->brik_help_run_undef_arg('open', $es)
1259 0 0 unless $self->brik_help_run_undef_arg('delete_document', $index)
1260 0 0 unless $self->brik_help_run_undef_arg('delete_document', $type)
1261 0 0 unless $self->brik_help_run_undef_arg('delete_document', $id)
1268 0 0 if ($self->use_type)
1272 0 0 if (defined $hash)
1273 0 0 unless $self->brik_help_run_invalid_arg('delete_document', $hash, 'HASH')
1282 0 0 if ($@)
1300 0 0 unless $self->brik_help_run_undef_arg('open', $es)
1301 0 0 unless $self->brik_help_run_undef_arg('delete_by_query', $query)
1302 0 0 unless $self->brik_help_run_undef_arg('delete_by_query', $index)
1303 0 0 unless $self->brik_help_run_undef_arg('delete_by_query', $type)
1304 0 0 unless $self->brik_help_run_invalid_arg('delete_by_query', $query, 'HASH')
1313 0 0 if ($self->use_type)
1317 0 0 if (defined $proceed and $proceed)
1325 0 0 if ($@)
1346 0 0 unless $self->brik_help_run_undef_arg('open', $es)
1352 0 0 if ($@)
1359 0 0 if (@lines == 0)
1364 0 0 if (defined $string)
1366 0 0 if (/$string/)
1383 0 0 unless $self->brik_help_run_undef_arg('open', $es)
1389 0 0 if ($@)
1396 0 0 if (@lines == 0)
1410 0 0 unless $self->brik_help_run_undef_arg('open', $es)
1416 0 0 if ($@)
1423 0 0 if (@lines == 0)
1437 0 0 unless $self->brik_help_run_undef_arg('open', $es)
1443 0 0 if ($@)
1450 0 0 if (@lines == 0)
1464 0 0 unless $self->brik_help_run_undef_arg('open', $es)
1470 0 0 if ($@)
1477 0 0 if (@lines == 0)
1488 0 0 unless my $get = $self->get_indices
1492 0 0 if (defined $regex) { }
1493 0 0 if ($_->{'index'} =~ /$regex/)
1509 0 0 unless my $lines = $self->show_indices($string)
1510 0 0 if (@$lines == 0)
1524 0 0 if (@t == 10) { }
0 0 elsif (@t == 9) { }
0 0 elsif (@t == 8) { }
1572 0 0 unless $self->brik_help_run_undef_arg('open', $es)
1573 0 0 unless $self->brik_help_run_undef_arg('get_index', $index)
1574 0 0 unless $self->brik_help_run_invalid_arg('get_index', $index, 'ARRAY', 'SCALAR')
1584 0 0 if ($@)
1597 0 0 unless $self->brik_help_run_undef_arg('open', $es)
1598 0 0 unless $self->brik_help_run_undef_arg('get_index', $index)
1608 0 0 if ($@)
1622 0 0 unless $self->brik_help_run_undef_arg('open', $es)
1623 0 0 unless $self->brik_help_run_undef_arg('list_index_types', $index)
1624 0 0 unless $self->brik_help_run_invalid_arg('list_index_types', $index, 'SCALAR')
1626 0 0 unless my $r = $self->get_mappings($index)
1627 0 0 if (keys %$r > 1)
1652 0 0 unless $self->brik_help_run_undef_arg('open', $es)
1653 0 0 unless $self->brik_help_run_undef_arg('list_index_fields', $index)
1654 0 0 unless $self->brik_help_run_invalid_arg('list_index_fields', $index, 'SCALAR')
1657 0 0 if (defined $type) { }
1658 0 0 unless $r = $self->get_mappings($index, $type)
1659 0 0 if (keys %$r > 1)
1664 0 0 if ($self->is_mapping_exists($index, '_default_'))
1674 0 0 unless $r = $self->get_mappings($index)
1675 0 0 if (keys %$r > 1)
1700 0 0 unless $self->brik_help_run_undef_arg('open', $es)
1701 0 0 unless $self->brik_help_run_undef_arg('list_indices_version', $index)
1702 0 0 unless $self->brik_help_run_invalid_arg('list_indices_version', $index, 'ARRAY', 'SCALAR')
1705 0 0 unless my $r = $self->get_index($index)
1725 0 0 unless $self->brik_help_run_undef_arg('open', $es)
1726 0 0 unless $self->brik_help_run_undef_arg('open_index', $index)
1727 0 0 unless $self->brik_help_run_invalid_arg('open_index', $index, 'ARRAY', 'SCALAR')
1735 0 0 if ($@)
1748 0 0 unless $self->brik_help_run_undef_arg('open', $es)
1749 0 0 unless $self->brik_help_run_undef_arg('close_index', $index)
1750 0 0 unless $self->brik_help_run_invalid_arg('close_index', $index, 'ARRAY', 'SCALAR')
1758 0 0 if ($@)
1775 0 0 unless $self->brik_help_run_undef_arg('open', $es)
1794 0 0 if ($@)
1815 0 0 unless $self->brik_help_run_undef_arg('open', $es)
1816 0 0 unless $self->brik_help_run_undef_arg('put_alias', $index)
1817 0 0 unless $self->brik_help_run_undef_arg('put_alias', $alias)
1828 0 0 if ($@)
1844 0 0 unless $self->brik_help_run_undef_arg('open', $es)
1845 0 0 unless $self->brik_help_run_undef_arg('delete_alias', $index)
1846 0 0 unless $self->brik_help_run_undef_arg('delete_alias', $alias)
1857 0 0 if ($@)
1870 0 0 unless $self->brik_help_run_undef_arg('open', $es)
1871 0 0 unless $self->brik_help_run_undef_arg('update_alias', $new_index)
1872 0 0 unless $self->brik_help_run_undef_arg('update_alias', $alias)
1876 0 0 unless my $aliases = $self->get_aliases
1879 0 0 if ($this eq $alias)
1884 0 0 if $prev_index
1888 0 0 if (defined $prev_index)
1889 0 0 unless $self->delete_alias($prev_index, $alias)
1899 0 0 unless $self->brik_help_run_undef_arg('is_mapping_exists', $index)
1900 0 0 unless $self->brik_help_run_undef_arg('is_mapping_exists', $mapping)
1902 0 0 unless ($self->is_index_exists($index))
1906 0 0 unless my $all = $self->get_mappings($index)
1910 0 0 if ($this_mapping eq $mapping)
1927 0 0 unless $self->brik_help_run_undef_arg('open', $es)
1928 0 0 unless $self->brik_help_run_undef_arg('get_mappings', $index)
1929 0 0 unless $self->brik_help_run_invalid_arg('get_mappings', $index, 'ARRAY', 'SCALAR')
1936 0 0 if ($self->use_type)
1944 0 0 if ($@)
1961 0 0 unless $self->brik_help_run_undef_arg('open', $es)
1962 0 0 unless $self->brik_help_run_undef_arg('create_index', $index)
1968 0 0 if (defined $shards)
1976 0 0 if ($@)
1993 0 0 unless $self->brik_help_run_undef_arg('open', $es)
1994 0 0 unless $self->brik_help_run_undef_arg('create_index_with_mappings', $index)
1995 0 0 unless $self->brik_help_run_undef_arg('create_index_with_mappings', $mappings)
1996 0 0 unless $self->brik_help_run_invalid_arg('create_index_with_mappings', $mappings, 'HASH')
2008 0 0 if ($@)
2023 0 0 unless $self->brik_help_run_undef_arg('info', $nodes)
2024 0 0 unless $self->brik_help_run_invalid_arg('info', $nodes, 'ARRAY')
2025 0 0 unless $self->brik_help_run_empty_array_arg('info', $nodes)
2029 0 0 unless $self->get($first)
2039 0 0 unless $self->brik_help_run_undef_arg('version', $nodes)
2040 0 0 unless $self->brik_help_run_invalid_arg('version', $nodes, 'ARRAY')
2041 0 0 unless $self->brik_help_run_empty_array_arg('version', $nodes)
2045 0 0 unless $self->get($first)
2046 0 0 unless my $content = $self->content
2058 0 0 unless $self->brik_help_run_undef_arg('open', $es)
2064 0 0 if ($@)
2075 0 0 unless my $content = $self->get_templates
2088 0 0 unless $self->brik_help_run_undef_arg('open', $es)
2089 0 0 unless $self->brik_help_run_undef_arg('get_template', $template)
2097 0 0 if ($@)
2110 0 0 unless $self->brik_help_run_undef_arg('open', $es)
2111 0 0 unless $self->brik_help_run_undef_arg('put_mapping', $index)
2112 0 0 unless $self->brik_help_run_undef_arg('put_mapping', $type)
2113 0 0 unless $self->brik_help_run_undef_arg('put_mapping', $mapping)
2114 0 0 unless $self->brik_help_run_invalid_arg('put_mapping', $mapping, 'HASH')
2123 0 0 if ($self->use_type)
2128 0 0 if ($@)
2145 0 0 unless $self->brik_help_run_undef_arg('open', $es)
2146 0 0 unless $self->brik_help_run_undef_arg('put_template', $name)
2147 0 0 unless $self->brik_help_run_undef_arg('put_template', $template)
2148 0 0 unless $self->brik_help_run_invalid_arg('put_template', $template, 'HASH')
2158 0 0 if ($@)
2172 0 0 unless $self->brik_help_run_undef_arg('open', $es)
2173 0 0 unless $self->brik_help_run_undef_arg('put_mapping_from_json_file', $index)
2175 0 0 unless $self->brik_help_run_undef_arg('put_mapping_from_json_file', $type)
2177 0 0 unless $self->brik_help_run_undef_arg('put_mapping_from_json_file', $json_file)
2179 0 0 unless $self->brik_help_run_file_not_found('put_mapping_from_json_file', $json_file)
2182 0 0 unless my $fj = 'Metabrik::File::Json'->new_from_brik_init($self)
2183 0 0 unless my $data = $fj->read($json_file)
2185 0 0 unless (exists $data->{'mappings'})
2198 0 0 unless $self->brik_help_run_undef_arg('open', $es)
2199 0 0 unless $self->brik_help_run_undef_arg('update_mapping_from_json_file', $json_file)
2201 0 0 unless $self->brik_help_run_file_not_found('update_mapping_from_json_file', $json_file)
2203 0 0 unless $self->brik_help_run_undef_arg('update_mapping_from_json_file', $type)
2205 0 0 unless $self->brik_help_run_undef_arg('update_mapping_from_json_file', $index)
2208 0 0 unless my $fj = 'Metabrik::File::Json'->new_from_brik_init($self)
2209 0 0 unless my $data = $fj->read($json_file)
2211 0 0 unless (exists $data->{'mappings'})
2226 0 0 unless $self->brik_help_run_undef_arg('open', $es)
2227 0 0 unless $self->brik_help_run_undef_arg('put_template_from_json_file', $json_file)
2229 0 0 unless $self->brik_help_run_file_not_found('put_template_from_json_file', $json_file)
2232 0 0 unless my $fj = 'Metabrik::File::Json'->new_from_brik_init($self)
2233 0 0 unless my $data = $fj->read($json_file)
2235 0 0 unless (defined $name)
2239 0 0 unless (defined $name)
2252 0 0 unless $self->brik_help_run_undef_arg('open', $es)
2253 0 0 unless $self->brik_help_run_undef_arg('update_template_from_json_file', $json_file)
2255 0 0 unless $self->brik_help_run_file_not_found('update_template_from_json_file', $json_file)
2258 0 0 unless my $fj = 'Metabrik::File::Json'->new_from_brik_init($self)
2259 0 0 unless my $data = $fj->read($json_file)
2261 0 0 unless (defined $name)
2265 0 0 unless (defined $name)
2285 0 0 unless $self->brik_help_run_undef_arg('open', $es)
2288 0 0 if (defined $indices)
2289 0 0 unless $self->brik_help_run_undef_arg('get_settings', $indices)
2290 0 0 unless my $ref = $self->brik_help_run_invalid_arg('get_settings', $indices, 'ARRAY', 'SCALAR')
2294 0 0 if (defined $names)
2295 0 0 unless $self->brik_help_run_file_not_found('get_settings', $names)
2296 0 0 unless my $ref = $self->brik_help_run_invalid_arg('get_settings', $names, 'ARRAY', 'SCALAR')
2305 0 0 if ($@)
2328 0 0 unless $self->brik_help_run_undef_arg('open', $es)
2329 0 0 unless $self->brik_help_run_undef_arg('put_settings', $settings)
2330 0 0 unless $self->brik_help_run_invalid_arg('put_settings', $settings, 'HASH')
2335 0 0 if (defined $indices)
2336 0 0 unless $self->brik_help_run_undef_arg('put_settings', $indices)
2337 0 0 unless my $ref = $self->brik_help_run_invalid_arg('put_settings', $indices, 'ARRAY', 'SCALAR')
2346 0 0 if ($@)
2359 0 0 unless $self->brik_help_run_undef_arg('open', $es)
2360 0 0 unless $self->brik_help_run_undef_arg('set_index_readonly', $indices)
2361 0 0 unless $self->brik_help_run_invalid_arg('set_index_readonly', $indices, 'ARRAY', 'SCALAR')
2364 0 0 if (not defined $bool) { }
2368 0 0 $bool ? :
2413 0 0 unless $self->brik_help_run_undef_arg('open', $es)
2414 0 0 unless $self->brik_help_run_invalid_arg('reset_index_readonly', $indices, 'ARRAY', 'SCALAR')
2434 0 0 unless $self->brik_help_run_undef_arg('open', $es)
2436 0 0 unless my $list = $self->list_indices
2440 0 0 unless my $ro = $self->get_index_readonly($this)
2441 0 0 if (defined $ro->{'index'}{'provided_name'})
2454 0 0 unless $self->brik_help_run_undef_arg('open', $es)
2455 0 0 unless $self->brik_help_run_undef_arg('set_index_number_of_replicas', $indices)
2456 0 0 unless $self->brik_help_run_invalid_arg('set_index_number_of_replicas', $indices, 'ARRAY', 'SCALAR')
2469 0 0 unless $self->brik_help_run_undef_arg('open', $es)
2470 0 0 unless $self->brik_help_run_undef_arg('set_index_refresh_interval', $indices)
2471 0 0 unless $self->brik_help_run_invalid_arg('set_index_refresh_interval', $indices, 'ARRAY', 'SCALAR')
2476 0 0 if ($number =~ /^\d+$/ and $number > 0)
2490 0 0 unless $self->brik_help_run_undef_arg('open', $es)
2491 0 0 unless $self->brik_help_run_undef_arg('get_index_settings', $indices)
2492 0 0 unless $self->brik_help_run_invalid_arg('get_index_settings', $indices, 'ARRAY', 'SCALAR')
2510 0 0 unless $self->brik_help_run_undef_arg('open', $es)
2511 0 0 unless $self->brik_help_run_undef_arg('get_index_readonly', $indices)
2512 0 0 unless $self->brik_help_run_invalid_arg('get_index_readonly', $indices, 'ARRAY', 'SCALAR')
2531 0 0 unless $self->brik_help_run_undef_arg('open', $es)
2532 0 0 unless $self->brik_help_run_undef_arg('get_index_number_of_replicas', $indices)
2533 0 0 unless $self->brik_help_run_invalid_arg('get_index_number_of_replicas', $indices, 'ARRAY', 'SCALAR')
2551 0 0 unless $self->brik_help_run_undef_arg('open', $es)
2552 0 0 unless $self->brik_help_run_undef_arg('get_index_refresh_interval', $indices)
2553 0 0 unless $self->brik_help_run_invalid_arg('get_index_refresh_interval', $indices, 'ARRAY', 'SCALAR')
2571 0 0 unless $self->brik_help_run_undef_arg('open', $es)
2572 0 0 unless $self->brik_help_run_undef_arg('get_index_number_of_shards', $indices)
2573 0 0 unless $self->brik_help_run_invalid_arg('get_index_number_of_shards', $indices, 'ARRAY', 'SCALAR')
2594 0 0 unless $self->brik_help_run_undef_arg('open', $es)
2595 0 0 unless $self->brik_help_run_undef_arg('delete_template', $name)
2603 0 0 if ($@)
2619 0 0 unless $self->brik_help_run_undef_arg('open', $es)
2620 0 0 unless $self->brik_help_run_undef_arg('is_index_exists', $index)
2628 0 0 if ($@)
2633 0 0 $r ? :
2644 0 0 unless $self->brik_help_run_undef_arg('open', $es)
2645 0 0 unless $self->brik_help_run_undef_arg('is_type_exists', $index)
2646 0 0 unless $self->brik_help_run_undef_arg('is_type_exists', $type)
2653 0 0 if ($self->use_type)
2658 0 0 if ($@)
2664 0 0 $r ? :
2675 0 0 unless $self->brik_help_run_undef_arg('open', $es)
2676 0 0 unless $self->brik_help_run_undef_arg('is_document_exists', $index)
2677 0 0 unless $self->brik_help_run_undef_arg('is_document_exists', $type)
2678 0 0 unless $self->brik_help_run_undef_arg('is_document_exists', $document)
2679 0 0 unless $self->brik_help_run_invalid_arg('is_document_exists', $document, 'HASH')
2687 0 0 if ($self->use_type)
2692 0 0 if ($@)
2698 0 0 $r ? :
2705 0 0 unless $self->brik_help_run_undef_arg('parse_error_string', $string)
2712 0 0 if (defined $dump and length $dump)
2713 0 0 unless my $sd = 'Metabrik::String::Dump'->new_from_brik_init($self)
2718 0 0 if (defined $node and $node =~ /^http/ and $code =~ /^\d+$/ and defined $dump and ref $dump eq 'HASH')
2746 0 0 unless $self->brik_help_run_undef_arg('open', $es)
2747 0 0 unless $self->brik_help_run_undef_arg('refresh_index', $index)
2759 0 0 if ($@)
2760 0 0 if (--$try == 0)
2763 0 0 if (defined $p and exists $p->{'class'}) { }
2788 0 0 unless $self->brik_help_run_undef_arg('open', $es)
2789 0 0 unless $self->brik_help_run_undef_arg('export_as', $format)
2790 0 0 unless $self->brik_help_run_undef_arg('export_as', $index)
2791 0 0 unless $self->brik_help_run_undef_arg('export_as', $size)
2793 0 0 if ($format ne 'csv' and $format ne 'json')
2804 0 0 unless my $version = $self->version
2805 0 0 if ($version lt '5.0.0') { }
2806 0 0 unless $scroll = $self->open_scroll_scan_mode($index, $size)
2809 0 0 unless $scroll = $self->open_scroll($index, $size)
2814 0 0 unless my $fd = 'Metabrik::File::Dump'->new_from_brik_init($self)
2818 0 0 if ($format eq 'csv') { }
0 0 elsif ($format eq 'json') { }
2819 0 0 unless $out = 'Metabrik::File::Csv'->new_from_brik_init($self)
2827 0 0 if (defined $self->csv_header)
2831 0 0 if (defined $self->csv_encoded_fields)
2834 0 0 if (defined $self->csv_object_fields)
2841 0 0 unless $out = 'Metabrik::File::Json'->new_from_brik_init($self)
2860 0 0 if (defined $cb)
2862 0 0 unless (defined $this)
2874 0 0 unless (exists $types{$type})
2875 0 0 if ($format eq 'csv') { }
0 0 elsif ($format eq 'json') { }
2877 0 0 if (not defined $csv_header) { }
2878 0 0 unless my $fields = $self->list_index_fields($index, $type)
2893 0 0 if (-f $done)
2909 0 0 if ($format eq 'csv')
2914 0 0 if (@{$chunk{$type};} > 999)
2916 0 0 unless (defined $r)
2926 0 0 unless (++$exported % 100000)
2936 0 0 if ($max > 0 and $exported >= $max)
2947 0 0 if (@{$chunk{$type};} > 0)
2958 0 0 if ($duration > 0)
2970 0 0 $exported == $total ? :
2974 0 0 unless $fd->write($result, $done)
2987 0 0 unless $self->brik_help_run_undef_arg('open', $es)
2988 0 0 unless $self->brik_help_run_undef_arg('export_as_csv', $index)
2989 0 0 unless $self->brik_help_run_undef_arg('export_as_csv', $size)
3000 0 0 unless $self->brik_help_run_undef_arg('open', $es)
3001 0 0 unless $self->brik_help_run_undef_arg('export_as_json', $index)
3002 0 0 unless $self->brik_help_run_undef_arg('export_as_json', $size)
3016 0 0 unless $self->brik_help_run_undef_arg('open', $es)
3017 0 0 unless $self->brik_help_run_undef_arg('import_from', $format)
3018 0 0 unless $self->brik_help_run_undef_arg('import_from', $input)
3019 0 0 unless $self->brik_help_run_file_not_found('import_from', $input)
3021 0 0 if ($format ne 'csv' and $format ne 'json')
3028 0 0 unless (defined $index and defined $type)
3030 0 0 if ($input =~ /^(.+):(.+)\.(?:csv|json)(?:.*)?$/)
3040 0 0 if (-f $done)
3049 0 0 unless $self->brik_help_set_undef_arg('index', $index)
3050 0 0 unless $self->brik_help_set_undef_arg('type', $type)
3052 0 0 if ($index eq '*')
3056 0 0 if ($self->use_type)
3057 0 0 if ($type eq '*')
3068 0 0 if ($self->is_index_exists($index))
3070 0 0 unless (defined $count_before)
3079 0 0 unless $self->open_bulk_mode($index, $type)
3084 0 0 unless my $fd = 'Metabrik::File::Dump'->new_from_brik_init($self)
3087 0 0 if ($format eq 'csv') { }
0 0 elsif ($format eq 'json') { }
3088 0 0 unless $out = 'Metabrik::File::Csv'->new_from_brik_init($self)
3097 0 0 unless $out = 'Metabrik::File::Json'->new_from_brik_init($self)
3114 0 0 $self->use_ignore_id ? :
3120 0 0 if (defined $value and length $value)
3125 0 0 if (defined $cb)
3127 0 0 unless (defined $h)
3137 0 0 if (defined $hash and defined $hash->{'routing'} and defined $$h{$hash->{'routing'}})
3150 0 0 if ($@)
3154 0 0 unless (defined $r)
3164 0 0 if ($first and $self->is_index_exists($index))
3171 0 0 if ($self->use_indexing_optimizations)
3179 0 0 unless (++$imported % 100000)
3187 0 0 if ($max > 0 and $imported >= $max)
3202 0 0 unless my $count_current = $self->count($index, $type)
3207 0 0 $count_current - $count_before == $read ? :
3208 0 0 if ($complete) { }
3227 0 0 unless $fd->write($result, $done)
3230 0 0 if (defined $refresh_interval)
3233 0 0 if (defined $number_of_replicas and $self->use_indexing_optimizations)
3245 0 0 unless $self->brik_help_run_undef_arg('open', $es)
3246 0 0 unless $self->brik_help_run_undef_arg('import_from_csv', $input)
3247 0 0 unless $self->brik_help_run_file_not_found('import_from_csv', $input)
3258 0 0 unless $self->brik_help_run_undef_arg('open', $es)
3259 0 0 unless $self->brik_help_run_undef_arg('import_from_json', $input)
3260 0 0 unless $self->brik_help_run_file_not_found('import_from_json', $input)
3274 0 0 unless $self->brik_help_run_undef_arg('open', $es)
3275 0 0 unless $self->brik_help_run_undef_arg('import_from_csv_worker', $input_csv)
3277 0 0 unless $self->brik_help_run_file_not_found('import_from_csv_worker', $input_csv)
3281 0 0 unless (defined $index and defined $type)
3283 0 0 if ($input_csv =~ /^(.+):(.+)\.csv(?:.*)?$/)
3292 0 0 if (-f $done)
3301 0 0 unless $self->brik_help_set_undef_arg('index', $index)
3302 0 0 unless $self->brik_help_set_undef_arg('type', $type)
3304 0 0 if ($index eq '*')
3308 0 0 if ($self->use_type)
3309 0 0 if ($type eq '*')
3320 0 0 if ($self->is_index_exists($index))
3322 0 0 unless (defined $count_before)
3331 0 0 unless $self->open_bulk_mode($index, $type)
3339 0 0 unless my $fd = 'Metabrik::File::Dump'->new_from_brik_init($self)
3341 0 0 unless my $fc = 'Metabrik::File::Csv'->new_from_brik_init($self)
3348 0 0 unless my $wp = 'Metabrik::Worker::Parallel'->new_from_brik_init($self)
3351 0 0 unless $wp->create_manager
3376 0 0 if (defined $value and length $value)
3381 0 0 if (defined $cb)
3383 0 0 unless (defined $h)
3398 0 0 if ($@)
3402 0 0 unless (defined $r)
3410 0 0 unless ($imported % 10000)
3425 0 0 if ($first and $self->is_index_exists($index))
3432 0 0 if ($self->use_indexing_optimizations)
3451 0 0 if ($max > 0 and $imported >= $max)
3457 0 0 if @$list < $batch
3472 0 0 unless my $count_current = $self->count($index, $type)
3477 0 0 $count_current - $count_before == $read ? :
3478 0 0 if ($complete) { }
3497 0 0 unless $fd->write($result, $done)
3500 0 0 if (defined $refresh_interval)
3503 0 0 if (defined $number_of_replicas and $self->use_indexing_optimizations)
3519 0 0 unless $self->brik_help_run_undef_arg('open', $es)
3527 0 0 if ($@)
3544 0 0 unless $self->brik_help_run_undef_arg('open', $es)
3552 0 0 if ($@)
3567 0 0 unless $self->brik_help_run_undef_arg('open', $es)
3573 0 0 if ($@)
3588 0 0 unless $self->brik_help_run_undef_arg('open', $es)
3594 0 0 if ($@)
3609 0 0 unless $self->brik_help_run_undef_arg('open', $es)
3615 0 0 if ($@)
3631 0 0 unless $self->brik_help_run_undef_arg('open', $es)
3632 0 0 unless $self->brik_help_run_undef_arg('put_cluster_settings', $settings)
3633 0 0 unless $self->brik_help_run_invalid_arg('put_cluster_settings', $settings, 'HASH')
3643 0 0 if ($@)
3654 0 0 unless my $get = $self->show_indices
3658 0 0 if (/^\s*green\s+/)
3669 0 0 unless my $get = $self->show_indices
3673 0 0 if (/^\s*yellow\s+/)
3684 0 0 unless my $get = $self->show_indices
3688 0 0 if (/^\s*red\s+/)
3699 0 0 unless my $get = $self->show_indices
3707 0 0 unless my $get = $self->show_indices
3713 0 0 if (/^\s*red\s+/) { }
0 0 elsif (/^\s*yellow\s+/) { }
0 0 elsif (/^\s*green\s+/) { }
3734 0 0 unless my $indices = $self->get_indices
3748 0 0 unless my $indices = $self->get_indices($string)
3750 0 0 unless my $fn = 'Metabrik::Format::Number'->new_from_brik_init($self)
3771 0 0 unless my $indices = $self->get_indices($string)
3773 0 0 unless my $fn = 'Metabrik::Format::Number'->new_from_brik_init($self)
3793 0 0 unless my $indices = $self->get_indices
3795 0 0 unless my $fn = 'Metabrik::Format::Number'->new_from_brik_init($self)
3811 0 0 unless my $get = $self->get_indices
3815 0 0 if ($_->{'color'} eq 'green')
3826 0 0 unless my $get = $self->get_indices
3830 0 0 if ($_->{'color'} eq 'yellow')
3841 0 0 unless my $get = $self->get_indices
3845 0 0 if ($_->{'color'} eq 'red')
3871 0 0 unless $self->brik_help_run_undef_arg('get_hits_total', $run)
3873 0 0 if (ref $run eq 'HASH')
3874 0 0 if (exists $run->{'hits'} and exists $run->{'hits'}{'total'})
3910 0 0 unless $self->brik_help_run_undef_arg('open', $es)
3916 0 0 if ($@)
3940 0 0 unless $self->brik_help_run_undef_arg('open', $es)
3941 0 0 unless $self->brik_help_run_undef_arg('create_snapshot_repository', $body)
3954 0 0 if ($@)
3967 0 0 unless $self->brik_help_run_undef_arg('create_shared_fs_snapshot_repository', $location)
3969 0 0 unless ($location =~ m[^/])
3992 0 0 unless $self->brik_help_run_undef_arg('open', $es)
3998 0 0 if ($@)
4013 0 0 unless $self->brik_help_run_undef_arg('open', $es)
4019 0 0 if ($@)
4035 0 0 unless $self->brik_help_run_undef_arg('open', $es)
4044 0 0 if (defined $body)
4052 0 0 if ($@)
4064 0 0 unless $self->brik_help_run_undef_arg('create_snapshot_for_indices', $indices)
4079 0 0 unless my $status = $self->get_snapshot_status
4081 0 0 if (@{$status->{'snapshots'};} == 0)
4091 0 0 if ($self->is_snapshot_finished)
4095 0 0 unless my $status = $self->get_snapshot_status
4105 0 0 if ($done) { }
4125 0 0 unless $self->brik_help_run_undef_arg('open', $es)
4126 0 0 unless $self->brik_help_run_undef_arg('delete_snapshot_repository', $repository_name)
4134 0 0 if ($@)
4147 0 0 unless $self->brik_help_run_undef_arg('open', $es)
4159 0 0 if ($@)
4175 0 0 unless $self->brik_help_run_undef_arg('open', $es)
4176 0 0 unless $self->brik_help_run_undef_arg('delete_snapshot', $snapshot_name)
4177 0 0 unless $self->brik_help_run_undef_arg('delete_snapshot', $repository_name)
4189 0 0 if ($@)
4207 0 0 unless $self->brik_help_run_undef_arg('open', $es)
4208 0 0 unless $self->brik_help_run_undef_arg('restore_snapshot', $snapshot_name)
4209 0 0 unless $self->brik_help_run_undef_arg('restore_snapshot', $repository_name)
4215 0 0 if (defined $body)
4223 0 0 if ($@)
4237 0 0 unless $self->brik_help_run_undef_arg('restore_snapshot_for_indices', $indices)
4238 0 0 unless $self->brik_help_run_undef_arg('restore_snapshot_for_indices', $snapshot_name)
4239 0 0 unless $self->brik_help_run_undef_arg('restore_snapshot_for_indices', $repository_name)