/[wait]/trunk/script/index_ora
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/script/index_ora

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

revision 55 by ulpfr, Mon Dec 31 14:07:22 2001 UTC revision 65 by laperla, Wed Jan 23 12:22:54 2002 UTC
# Line 1  Line 1 
1  #!/usr/bin/perl -w  #!/usr/bin/perl -w
2  #                              -*- Mode: Perl -*-  #                              -*- Mode: Perl -*-
3  # $Basename$  # $Basename$
4  # $Revision: 1.1 $  # $Revision: 1.4 $
5  # Author          : Ulrich Pfeifer  # Author          : Ulrich Pfeifer
6  # Created On      : Mon Dec 31 13:57:11 2001  # Created On      : Mon Dec 31 13:57:11 2001
7  # Last Modified By: Ulrich Pfeifer  # Last Modified By: Ulrich Pfeifer
8  # Last Modified On: Mon Dec 31 14:37:43 2001  # Last Modified On: Fri Jan  4 15:59:20 2002
9  # Language        : CPerl  # Language        : CPerl
10  #  #
11  # (C) Copyright 2001, UUNET Deutschland GmbH, Germany  # (C) Copyright 2001, UUNET Deutschland GmbH, Germany
# Line 79  my $access = tie %D, 'WAIT::Document::Or Line 79  my $access = tie %D, 'WAIT::Document::Or
79    or die "Couldn't tie to file: $!\n";    or die "Couldn't tie to file: $!\n";
80    
81  my $tb = $db->create_table(name     => $OPT{table},  my $tb = $db->create_table(name     => $OPT{table},
82                             attr     => ['text', 'author', 'title',                             attr     => ['author', 'isbn', 'title',
83                                          'headline', 'docid'],                                          'headline', 'docid'],
84                             layout   => $layout,                             layout   => $layout,
85                             access   => $access,                             access   => $access,
86                             invindex =>                             invindex =>
87                             [                             [
88                              'title'  => $stem,                              'title'  => $stem,
89                                'about'  => $stem,
90                              'text'   => $text,                              'text'   => $text,
91                              'author' => $text,                              'author' => $text,
92                                'colophon' => $text,
93                                'author' => $sound,
94                                'isbn'   => $text,
95                             ]                             ]
96                            );                            );
97  die "Couldn't create table $OPT{table}: $@\n" unless $tb;  die "Couldn't create table $OPT{table}: $@\n" unless $tb;
# Line 97  while (($did, $value) = each %D) { Line 101  while (($did, $value) = each %D) {
101    my $record   = $layout->split($value);    my $record   = $layout->split($value);
102    my $headline = $record->{title};    my $headline = $record->{title};
103    $headline =~ s/\s+/ /sg;    $headline =~ s/\s+/ /sg;
104    printf "%s\n", substr($headline,0,80);    printf "%15s %s\n", $record->{isbn}, substr($headline,0,60);
105    $tb->insert('docid'  => $did,    $tb->insert('docid'  => $did,
106                headline => $headline,                headline => $headline,
107                %{$record});                %{$record});

Legend:
Removed from v.55  
changed lines
  Added in v.65

  ViewVC Help
Powered by ViewVC 1.1.26