173 |
my $s; |
my $s; |
174 |
# re-write query from +/- to and/and not |
# re-write query from +/- to and/and not |
175 |
|
|
176 |
my @s_elem; |
my @s_highlite; |
177 |
|
|
178 |
my $search = param('search'); |
my $search = param('search'); |
179 |
|
|
187 |
# extract phrases and put them first |
# extract phrases and put them first |
188 |
while ($search =~ s/\s*("[^"]+")\s*/ /) { |
while ($search =~ s/\s*("[^"]+")\s*/ /) { |
189 |
$s .= "$1 "; |
$s .= "$1 "; |
190 |
push @s_elem, $1; |
push @s_highlite, $1; |
191 |
} |
} |
192 |
|
|
193 |
my %words; |
my %words; |
207 |
} else { |
} else { |
208 |
$s.="$2* "; |
$s.="$2* "; |
209 |
} |
} |
210 |
push @s_elem, $2; |
push @s_highlite, $2 if ($1 ne "-"); |
211 |
} else { |
} else { |
212 |
if (@spellings && !param('no_affix')) { |
if (@spellings && !param('no_affix')) { |
213 |
my $w = $_; $w =~ s/[\*\s]+//g; |
my $w = $_; $w =~ s/[\*\s]+//g; |
219 |
} else { |
} else { |
220 |
$s.="$_* "; |
$s.="$_* "; |
221 |
} |
} |
222 |
push @s_elem, $_; |
push @s_highlite, $_; |
223 |
} |
} |
224 |
} |
} |
225 |
|
|
297 |
if ($prop =~ m/swishdescription/) { |
if ($prop =~ m/swishdescription/) { |
298 |
my $tmp = get_snippet( |
my $tmp = get_snippet( |
299 |
$result->Property($prop), |
$result->Property($prop), |
300 |
@s_elem, |
@s_highlite, |
301 |
); |
); |
302 |
|
|
303 |
push @arr, $tmp; |
push @arr, $tmp; |