/[swish]/trunk/html/swish.cgi
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/html/swish.cgi

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 87 by dpavlin, Mon Aug 30 16:59:17 2004 UTC revision 88 by dpavlin, Tue Aug 31 07:47:05 2004 UTC
# Line 173  if (param('search')) { Line 173  if (param('search')) {
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    
# Line 187  if (param('search')) { Line 187  if (param('search')) {
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;
# Line 207  if (param('search')) { Line 207  if (param('search')) {
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;
# Line 219  if (param('search')) { Line 219  if (param('search')) {
219                          } else {                          } else {
220                                  $s.="$_* ";                                  $s.="$_* ";
221                          }                          }
222                          push @s_elem, $_;                          push @s_highlite, $_;
223                  }                  }
224          }          }
225    
# Line 297  if (param('search')) { Line 297  if (param('search')) {
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;

Legend:
Removed from v.87  
changed lines
  Added in v.88

  ViewVC Help
Powered by ViewVC 1.1.26