/[webpac2]/trunk/lib/WebPAC/Output/KinoSearch.pm
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/lib/WebPAC/Output/KinoSearch.pm

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

revision 436 by dpavlin, Mon Apr 17 16:50:53 2006 UTC revision 437 by dpavlin, Sun Apr 30 19:06:09 2006 UTC
# Line 155  sub add { Line 155  sub add {
155    
156          my $doc = $self->{invindex}->new_doc( $uri ) || $log->logdie("can't create new_doc( $uri )");          my $doc = $self->{invindex}->new_doc( $uri ) || $log->logdie("can't create new_doc( $uri )");
157    
158          sub add_value($$$) {          sub add_value($$$$$) {
159                  my ($doc,$n,$v) = @_;                  my ($self,$log,$doc,$n,$v) = @_;
160                    return unless ($v);
161                  eval { $doc->set_value($n, $self->convert($v) ) };                  eval { $doc->set_value($n, $self->convert($v) ) };
162                  $log->warn("can't insert: $n = $v") if ($@);                  $log->warn("can't insert: $n = $v") if ($@);
163          }          }
164    
165          add_value($doc, 'uri', $uri);          add_value($self,$log,$doc, 'uri', $uri);
166    
167          $log->debug("ds = ", sub { Dumper($args->{'ds'}) } );          $log->debug("ds = ", sub { Dumper($args->{'ds'}) } );
168    
# Line 183  sub add { Line 184  sub add {
184                  $vals = $self->convert( $vals ) or                  $vals = $self->convert( $vals ) or
185                          $log->logdie("can't convert '$vals' to UTF-8");                          $log->logdie("can't convert '$vals' to UTF-8");
186    
187                  add_value($doc, $tag, $vals );                  add_value($self, $log, $doc, $tag, $vals );
188          }          }
189    
190          if (my $text = $args->{'text'}) {          if (my $text = $args->{'text'}) {
191                  add_value($doc, 'bodytext', $text );                  add_value($self, $log, $doc, 'bodytext', $text );
192          }          }
193    
194          #$log->debug("adding ", sub { $doc->dump_draft } );          #$log->debug("adding ", sub { $doc->dump_draft } );

Legend:
Removed from v.436  
changed lines
  Added in v.437

  ViewVC Help
Powered by ViewVC 1.1.26