Branch Coverage

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


line true false branch
62 0 0 unless (defined $ce)
63 0 0 unless $ce = $self->open
74 0 0 if (defined $ce)
85 0 0 unless $self->brik_help_run_undef_arg("get_query_result_total", $run)
86 0 0 unless $self->brik_help_run_invalid_arg("get_query_result_total", $run, "HASH")
88 0 0 unless (exists $run->{'hits'})
91 0 0 unless (exists $run->{'hits'}{'total'})
102 0 0 unless $self->brik_help_run_undef_arg("get_query_result_hits", $run)
103 0 0 unless $self->brik_help_run_invalid_arg("get_query_result_hits", $run, "HASH")
105 0 0 unless (exists $run->{'hits'})
108 0 0 unless (exists $run->{'hits'}{'hits'})
119 0 0 unless $self->brik_help_run_undef_arg("get_query_result_aggregations", $run)
120 0 0 unless $self->brik_help_run_invalid_arg("get_query_result_aggregations", $run, "HASH")
123 0 0 unless (exists $run->{'aggregations'})
135 0 0 unless $self->brik_help_run_undef_arg("get_query_result_timed_out", $run)
136 0 0 unless $self->brik_help_run_invalid_arg("get_query_result_timed_out", $run, "HASH")
139 0 0 unless (exists $run->{'timed_out'})
144 0 0 $run->{'timed_out'} ? :
151 0 0 unless $self->brik_help_run_undef_arg("get_query_result_took", $run)
152 0 0 unless $self->brik_help_run_invalid_arg("get_query_result_took", $run, "HASH")
155 0 0 unless (exists $run->{'took'})
168 0 0 unless $self->brik_help_run_undef_arg("query", $q)
170 0 0 unless my $ce = $self->create_client
172 0 0 unless my $r = $self->SUPER::query($q, $index, $type, $hash)
173 0 0 if (defined $r)
174 0 0 if (exists $r->{'hits'}{'total'}) { }
194 0 0 unless $self->brik_help_run_undef_arg("term", $kv)
195 0 0 unless $self->brik_help_set_undef_arg("term", $index)
196 0 0 unless $self->brik_help_set_undef_arg("term", $type)
198 0 0 unless ($kv =~ /^\S+?=.+$/)
229 0 0 unless $self->brik_help_run_undef_arg("unique_term", $unique)
230 0 0 unless $self->brik_help_run_undef_arg("unique_term", $kv)
231 0 0 unless $self->brik_help_set_undef_arg("unique_term", $index)
232 0 0 unless $self->brik_help_set_undef_arg("unique_term", $type)
234 0 0 unless ($kv =~ /^.+?=.+$/)
275 0 0 unless $self->brik_help_run_undef_arg("unique_values", $field)
276 0 0 unless $self->brik_help_set_undef_arg("unique_values", $index)
277 0 0 unless $self->brik_help_set_undef_arg("unique_values", $type)
306 0 0 unless $self->brik_help_run_undef_arg("wildcard", $kv)
307 0 0 unless $self->brik_help_set_undef_arg("wildcard", $index)
308 0 0 unless $self->brik_help_set_undef_arg("wildcard", $type)
310 0 0 unless ($kv =~ /^\S+?=.+$/)
342 0 0 unless $self->brik_help_run_undef_arg("range", $kv_from)
343 0 0 unless $self->brik_help_run_undef_arg("range", $kv_to)
344 0 0 unless $self->brik_help_set_undef_arg("range", $index)
345 0 0 unless $self->brik_help_set_undef_arg("range", $type)
347 0 0 unless ($kv_from =~ /^\S+?=.+$/)
350 0 0 unless ($kv_to =~ /^\S+?=.+$/)
385 0 0 unless $self->brik_help_run_undef_arg("top", $kv_count)
386 0 0 unless $self->brik_help_set_undef_arg("top", $index)
387 0 0 unless $self->brik_help_set_undef_arg("top", $type)
389 0 0 unless ($kv_count =~ /^\S+=\d+$/)
417 0 0 unless $self->brik_help_run_undef_arg("match_phrase", $kv)
418 0 0 unless $self->brik_help_set_undef_arg("match_phrase", $index)
419 0 0 unless $self->brik_help_set_undef_arg("match_phrase", $type)
421 0 0 unless ($kv =~ /^\S+?=.+$/)
446 0 0 unless $self->brik_help_run_undef_arg("match", $kv)
447 0 0 unless $self->brik_help_set_undef_arg("match", $index)
448 0 0 unless $self->brik_help_set_undef_arg("match", $type)
450 0 0 unless ($kv =~ /^\S+?=.+$/)
478 0 0 unless $self->brik_help_run_undef_arg("top_match", $kv_count)
479 0 0 unless $self->brik_help_run_undef_arg("top_match", $kv_match)
480 0 0 unless $self->brik_help_set_undef_arg("top_match", $index)
481 0 0 unless $self->brik_help_set_undef_arg("top_match", $type)
483 0 0 unless ($kv_count =~ /^\S+?=.+$/)
486 0 0 unless ($kv_match =~ /^\S+?=.+$/)
522 0 0 unless $self->brik_help_run_undef_arg("from_json_file", $file)
523 0 0 unless $self->brik_help_run_file_not_found("from_json_file", $file)
524 0 0 unless $self->brik_help_set_undef_arg("from_json_file", $index)
525 0 0 unless $self->brik_help_set_undef_arg("from_json_file", $type)
527 0 0 unless my $fj = "Metabrik::File::Json"->new_from_brik_init($self)
528 0 0 unless my $q = $fj->read($file)
530 0 0 if (defined $q and length $q)
543 0 0 unless $self->brik_help_run_undef_arg("from_dump_file", $file)
544 0 0 unless $self->brik_help_run_file_not_found("from_dump_file", $file)
545 0 0 unless $self->brik_help_set_undef_arg("from_dump_file", $index)
546 0 0 unless $self->brik_help_set_undef_arg("from_dump_file", $type)
548 0 0 unless my $fd = "Metabrik::File::Dump"->new_from_brik_init($self)
549 0 0 unless my $q = $fd->read($file)
552 0 0 if (defined $first)