Branch Coverage

blib/lib/Search/Query/Dialect/SWISH.pm
Criterion Covered Total %
branch 48 66 72.7


line true false branch
76 8 71 unless ($swishdefault_field)
83 78 1 if ($self->{'default_field'} and not ref $self->{'default_field'})
112 192 104 unless exists $tree->{$prefix}
116 0 103 unless @clauses
118 148 0 if defined $_
129 1 93 unless defined $value
131 8 85 if ($self->fuzzify)
132 6 2 unless $value =~ /[\*\%]/
156 53 96 if ($clause->{'op'} eq '()')
158 5 48 if ($prefix eq '-') { }
170 88 8 $clause->{'field'} ? :
176 2 94 ref $clause->{'value'} ? :
182 26 70 if ($op eq ':')
185 4 92 if ($prefix eq '-')
188 0 96 if (defined $value and $value =~ /\%/)
189 0 0 $prefix eq '-' ? :
196 2 94 if ($proximity)
206 0 96 if (defined $field->callback)
214 0 96 if ($op eq '!~') { }
0 96 elsif ($op eq '~') { }
4 92 elsif (defined $value and $op eq '!=') { }
1 91 elsif ($op eq '..') { }
1 90 elsif ($op eq '!..') { }
1 89 elsif (not defined $value) { }
215 0 0 unless $value =~ /\Q$wildcard\E/
226 0 0 unless $value =~ /\Q$wildcard\E/
246 0 1 if (ref $value ne 'ARRAY' or @$value != 2)
252 0 2 if ($v =~ /\D/)
265 0 1 if (ref $value ne 'ARRAY' or @$value != 2)
271 0 2 if ($v =~ /\D/)
298 4 91 $prefix eq '-' ? :
300 0 95 scalar @buf > 1 ? :
0 95 scalar @buf > 1 ? :