22 |
my $MAX_HITS = 500; |
my $MAX_HITS = 500; |
23 |
my $ON_PAGE = 10; |
my $ON_PAGE = 10; |
24 |
|
|
25 |
Text::Iconv->raise_error(1); # Conversion errors raise exceptions |
Text::Iconv->raise_error(0); # Conversion errors raise exceptions |
26 |
|
|
27 |
my $from_utf8 = Text::Iconv->new('UTF8', $CHARSET); |
my $from_utf8 = Text::Iconv->new('UTF8', $CHARSET); |
28 |
|
|
109 |
push @swish_results, { |
push @swish_results, { |
110 |
nr => ($#swish_results + 2), |
nr => ($#swish_results + 2), |
111 |
path => $hit->swishdocpath, |
path => $hit->swishdocpath, |
112 |
headline => $from_utf8->convert($hit->headline), |
# headline => $from_utf8->convert($hit->headline), |
113 |
html => back2html($from_utf8->convert($hit->html)), |
# html => back2html($from_utf8->convert($hit->html)), |
114 |
|
headline => $hit->headline, |
115 |
|
html => back2html($hit->html), |
116 |
rank => $hit->swishrank }; |
rank => $hit->swishrank }; |
117 |
|
|
118 |
}, |
}, |