Branch Coverage

blib/lib/Interchange/Search/Solr.pm
Criterion Covered Total %
branch 6 180 3.3


line true false branch
235 0 0 if (my $stops = Lingua::StopWords::getStopWords($lang, 'UTF-8'))
322 0 0 if ($self->response->ok)
328 0 0 if $name =~ /^_/
417 0 0 if @_
421 0 0 if ($string and ref $string)
426 0 0 if ($string)
441 0 0 if ($self->wild_matching)
445 0 0 if (@terms) { }
453 0 0 if (my $structure = $self->search_structure)
475 0 0 if (@terms or %filters or $structure) { }
486 0 0 if (ref $query) { }
0 0 elsif ($query) { }
493 0 0 if (my $global = $self->global_conditions)
497 0 0 if (ref $global->{$condition} eq 'SCALAR') { }
512 0 0 unless ($self->permit_empty_search)
513 0 0 if ($self->_search_is_empty)
518 0 0 unless ($our_res)
524 0 0 if ($our_res->solr_status != 0)
548 0 0 if (my $facet_field = $self->facets)
554 0 0 if (my $filters = $self->filters)
557 0 0 if (my $condition = $filters->{$facet})
564 0 0 if (@fq)
569 0 0 if (my $sort_by = $self->sorting)
571 0 0 if (ref $sort_by) { }
579 0 0 if (my $fl = $self->return_fields)
600 0 0 unless $maybe_num
601 0 0 if ($maybe_num =~ /([1-9][0-9]*)/) { }
611 0 0 if (my $res = $self->response) { }
622 0 0 if ($self->response->ok)
656 0 0 if ($self->num_found > $self->_start_row + $self->_rows) { }
744 0 0 unless $mode
747 0 0 if ($mode eq 'add') { }
0 0 elsif ($mode eq 'clear') { }
0 0 elsif ($mode eq 'full') { }
0 0 elsif ($mode eq 'delta') { }
763 0 0 unless ($res)
768 0 0 if ($res->success)
785 1 2 if (ref $input eq 'ARRAY') { }
2 0 elsif (ref $input eq 'HASH') { }
799 4 0 if (defined $value)
801 2 2 if (ref $value eq 'ARRAY') { }
827 0 0 if (ref $input eq 'ARRAY') { }
866 0 0 if (my $enc = $self->input_encoding)
883 0 0 unless defined $url
885 0 0 unless @other_terms
902 0 0 unless $url
906 0 0 unless @fragments
910 0 0 if ($fragments[0] eq 'words')
914 0 0 if (@fragments)
920 0 0 if (@fragments > 1)
922 0 0 if ($fragments[$page - 1] eq 'page')
927 0 0 if ($page =~ s/^([1-9][0-9]*)$/)/) { }
943 0 0 if ($self->_fragment_is_keyword($chunk) and @fragments and not $self->_fragment_is_keyword($fragments[0]))
954 0 0 if ($current_filter) { }
969 0 0 unless defined $fragment
990 0 0 unless ($args{'hide_page'})
1018 0 0 unless $filters->{$facet}
1021 0 0 if ($self->_filter_is_active($facet, $name)) { }
0 0 elsif ($facet eq $field) { }
1029 0 0 if @active
1039 0 0 if (my $list = $self->filters->{$field})
1040 0 0 if (my(@active) = @$list)
1041 0 0 if (grep {$_ eq $name;} @active)
1105 0 0 unless $total
1107 0 0 if $total_pages < 2
1110 0 0 $page - $page_scope > 0 ? :
1111 0 0 $page + $page_scope < $total_pages ? :
1125 0 0 if ($position == 0) { }
0 0 elsif ($position == 1) { }
0 0 elsif ($position == -1) { }
1138 0 0 if ($page != $total_pages)
1143 0 0 if ($page != 1)
1187 0 0 unless @terms
1241 0 0 if (%$filters)
1243 0 0 if (my $terms = $filters->{$facet})
1261 0 0 if (my $struct = $self->terms_found) { }
1272 0 0 if (my $struct = $self->terms_found)
1273 0 0 if (my $terms = $struct->{'terms'})
1287 0 0 if ($term and $term =~ /\w/)
1288 0 0 if ($self->stop_words->{lc $term})
1291 0 0 if ($self->min_chars > 1)
1293 0 0 if ($term =~ /$re/) { }
1325 0 0 unless $key
1326 0 0 if (@rest or not $key =~ /^-(desc|asc)/i)
1351 0 0 unless defined $data
1353 0 0 &Scalar::Util::blessed($data) ? :
1354 0 0 unless $ref
1358 0 0 &Scalar::Util::blessed($data) ? :
1359 0 0 if $ref
1368 0 0 unless $coderef